diff --git a/Lab10/.vs/Lab10/v14/.suo b/Lab10/.vs/Lab10/v14/.suo new file mode 100644 index 0000000..17db452 Binary files /dev/null and b/Lab10/.vs/Lab10/v14/.suo differ diff --git a/Lab10/Debug/Lab10.exe b/Lab10/Debug/Lab10.exe new file mode 100644 index 0000000..7d58c98 Binary files /dev/null and b/Lab10/Debug/Lab10.exe differ diff --git a/Lab10/Debug/Lab10.ilk b/Lab10/Debug/Lab10.ilk new file mode 100644 index 0000000..14cc583 Binary files /dev/null and b/Lab10/Debug/Lab10.ilk differ diff --git a/Lab10/Debug/Lab10.pdb b/Lab10/Debug/Lab10.pdb new file mode 100644 index 0000000..78883a9 Binary files /dev/null and b/Lab10/Debug/Lab10.pdb differ diff --git a/Lab10/Lab10.VC.db b/Lab10/Lab10.VC.db new file mode 100644 index 0000000..23745cc Binary files /dev/null and b/Lab10/Lab10.VC.db differ diff --git a/Lab10/Lab10.sln b/Lab10/Lab10.sln new file mode 100644 index 0000000..ed2ed0e --- /dev/null +++ b/Lab10/Lab10.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Lab10", "Lab10\Lab10.vcxproj", "{16D0D5B8-7480-4E0F-92F7-4255739A59D3}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {16D0D5B8-7480-4E0F-92F7-4255739A59D3}.Debug|x64.ActiveCfg = Debug|x64 + {16D0D5B8-7480-4E0F-92F7-4255739A59D3}.Debug|x64.Build.0 = Debug|x64 + {16D0D5B8-7480-4E0F-92F7-4255739A59D3}.Debug|x86.ActiveCfg = Debug|Win32 + {16D0D5B8-7480-4E0F-92F7-4255739A59D3}.Debug|x86.Build.0 = Debug|Win32 + {16D0D5B8-7480-4E0F-92F7-4255739A59D3}.Release|x64.ActiveCfg = Release|x64 + {16D0D5B8-7480-4E0F-92F7-4255739A59D3}.Release|x64.Build.0 = Release|x64 + {16D0D5B8-7480-4E0F-92F7-4255739A59D3}.Release|x86.ActiveCfg = Release|Win32 + {16D0D5B8-7480-4E0F-92F7-4255739A59D3}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Lab10/Lab10/Debug/Lab10.log b/Lab10/Lab10/Debug/Lab10.log new file mode 100644 index 0000000..0898c00 --- /dev/null +++ b/Lab10/Lab10/Debug/Lab10.log @@ -0,0 +1,3 @@ + Main.cpp + Lab10.vcxproj -> c:\users\poile\documents\visual studio 2015\Projects\Lab10\Debug\Lab10.exe + Lab10.vcxproj -> c:\users\poile\documents\visual studio 2015\Projects\Lab10\Debug\Lab10.pdb (Full PDB) diff --git a/Lab10/Lab10/Debug/Lab10.tlog/CL.command.1.tlog b/Lab10/Lab10/Debug/Lab10.tlog/CL.command.1.tlog new file mode 100644 index 0000000..5783dae Binary files /dev/null and b/Lab10/Lab10/Debug/Lab10.tlog/CL.command.1.tlog differ diff --git a/Lab10/Lab10/Debug/Lab10.tlog/CL.read.1.tlog b/Lab10/Lab10/Debug/Lab10.tlog/CL.read.1.tlog new file mode 100644 index 0000000..b49b53a Binary files /dev/null and b/Lab10/Lab10/Debug/Lab10.tlog/CL.read.1.tlog differ diff --git a/Lab10/Lab10/Debug/Lab10.tlog/CL.write.1.tlog b/Lab10/Lab10/Debug/Lab10.tlog/CL.write.1.tlog new file mode 100644 index 0000000..6e35f3a Binary files /dev/null and b/Lab10/Lab10/Debug/Lab10.tlog/CL.write.1.tlog differ diff --git a/Lab10/Lab10/Debug/Lab10.tlog/Lab10.lastbuildstate b/Lab10/Lab10/Debug/Lab10.tlog/Lab10.lastbuildstate new file mode 100644 index 0000000..f8a2a72 --- /dev/null +++ b/Lab10/Lab10/Debug/Lab10.tlog/Lab10.lastbuildstate @@ -0,0 +1,2 @@ +#TargetFrameworkVersion=v4.0:PlatformToolSet=v140:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=8.1 +Debug|Win32|c:\users\poile\documents\visual studio 2015\Projects\Lab10\| diff --git a/Lab10/Lab10/Debug/Lab10.tlog/link.command.1.tlog b/Lab10/Lab10/Debug/Lab10.tlog/link.command.1.tlog new file mode 100644 index 0000000..9772c93 Binary files /dev/null and b/Lab10/Lab10/Debug/Lab10.tlog/link.command.1.tlog differ diff --git a/Lab10/Lab10/Debug/Lab10.tlog/link.read.1.tlog b/Lab10/Lab10/Debug/Lab10.tlog/link.read.1.tlog new file mode 100644 index 0000000..dfef6f1 Binary files /dev/null and b/Lab10/Lab10/Debug/Lab10.tlog/link.read.1.tlog differ diff --git a/Lab10/Lab10/Debug/Lab10.tlog/link.write.1.tlog b/Lab10/Lab10/Debug/Lab10.tlog/link.write.1.tlog new file mode 100644 index 0000000..493f1d5 Binary files /dev/null and b/Lab10/Lab10/Debug/Lab10.tlog/link.write.1.tlog differ diff --git a/Lab10/Lab10/Debug/Main.obj b/Lab10/Lab10/Debug/Main.obj new file mode 100644 index 0000000..71d8a20 Binary files /dev/null and b/Lab10/Lab10/Debug/Main.obj differ diff --git a/Lab10/Lab10/Debug/vc140.idb b/Lab10/Lab10/Debug/vc140.idb new file mode 100644 index 0000000..8d69191 Binary files /dev/null and b/Lab10/Lab10/Debug/vc140.idb differ diff --git a/Lab10/Lab10/Debug/vc140.pdb b/Lab10/Lab10/Debug/vc140.pdb new file mode 100644 index 0000000..2459a6c Binary files /dev/null and b/Lab10/Lab10/Debug/vc140.pdb differ diff --git a/Lab10/Lab10/Header.h b/Lab10/Lab10/Header.h new file mode 100644 index 0000000..8e9712f --- /dev/null +++ b/Lab10/Lab10/Header.h @@ -0,0 +1,8 @@ +#pragma once + +#include + +using std::cout; + +void mergeSort(int arr[], int startIndex, int endIndex); +void merge(int arr[], int startIndex, int middleIndex, int endIndex); diff --git a/Lab10/Lab10/Lab10.vcxproj b/Lab10/Lab10/Lab10.vcxproj new file mode 100644 index 0000000..fe2542b --- /dev/null +++ b/Lab10/Lab10/Lab10.vcxproj @@ -0,0 +1,153 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + {16D0D5B8-7480-4E0F-92F7-4255739A59D3} + Win32Proj + Lab10 + 8.1 + + + + Application + true + v140 + Unicode + + + Application + false + v140 + true + Unicode + + + Application + true + v140 + Unicode + + + Application + false + v140 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + true + + + false + + + false + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + + + + + + + Level3 + Disabled + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + true + true + + + + + Level3 + + + MaxSpeed + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + true + true + + + + + + + + + + + + \ No newline at end of file diff --git a/Lab10/Lab10/Lab10.vcxproj.filters b/Lab10/Lab10/Lab10.vcxproj.filters new file mode 100644 index 0000000..11fb718 --- /dev/null +++ b/Lab10/Lab10/Lab10.vcxproj.filters @@ -0,0 +1,27 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + + + Header Files + + + \ No newline at end of file diff --git a/Lab10/Lab10/Main.cpp b/Lab10/Lab10/Main.cpp new file mode 100644 index 0000000..d08d0b0 --- /dev/null +++ b/Lab10/Lab10/Main.cpp @@ -0,0 +1,56 @@ +#include "Header.h" + +int main(void) { + int data[] = { 2, 4, 3, 6, 7, 5, 1, 9, 8 }, size = 9; + mergeSort(data, 0, size - 1); + + for (int i = 0; i < size; i++) + cout << data[i] << " "; +} + +void mergeSort(int arr[], int startIndex, int endIndex) { + if (startIndex < endIndex) { + int middleIndex = (startIndex + endIndex) / 2; + + /*Sort first and second halves*/ + mergeSort(arr, middleIndex + 1, endIndex); + mergeSort(arr, startIndex, middleIndex); + + /*Merge*/ + merge(arr, startIndex, middleIndex, endIndex); + } +} + +void merge(int arr[], int startIndex, int middleIndex, int endIndex) { + int firstHalfLen = middleIndex - startIndex + 1; + int secondHalfLen = endIndex - middleIndex; + + /*create temp arrays*/ + int *firstHalf = new int [firstHalfLen], + *secondHalf = new int [secondHalfLen]; + + /*Copy data to temp arrays firstHalf[] and secondHalf[]*/ + for (int i = 0; i < firstHalfLen; i++) + firstHalf[i] = arr[startIndex + i]; + + for (int i = 0; i < secondHalfLen; i++) + secondHalf[i] = arr[middleIndex + i + 1]; + + /*Initial indexes for subarrays*/ + int i = 0, j = 0, k = startIndex; + + /*Merge the temp arrays back into arr[startIndex..endIndex]*/ + for (; i < firstHalfLen && j < secondHalfLen; k++) + if (firstHalf[i] <= secondHalf[j]) + arr[k] = firstHalf[i++]; + else + arr[k] = secondHalf[j++]; + + /*Copy the remaining elements of firstHalf[], if there are any*/ + for (; i < firstHalfLen; i++, k++) + arr[k] = firstHalf[i]; + + /*Copy the remaining elements of secondHalf[], if there are any*/ + for (; j < secondHalfLen; j++, k++) + arr[k] = secondHalf[j]; +} diff --git a/Lab8/Lab8/BSTNode.h b/Lab8/Lab8/BSTNode.h index 1ffba4d..e2cb578 100644 --- a/Lab8/Lab8/BSTNode.h +++ b/Lab8/Lab8/BSTNode.h @@ -17,3 +17,38 @@ class BSTNode { /**NON MEMBER FUNCTIONS**/ ostream &operator<<(ostream &lhs, BSTNode &rhs); + + +bool &operator==(Recipe r1, Reipe r2) { + int r1ISize = sizeof(r1.getIngredients())/sizeof(*r1.getIngredients()); + int r1DSize = sizeof(r1.getDirections())/sizeof(*r1.getDirections()); + int r2ISize = sizeof(r2.getIngredients())/sizeof(*r2.getIngredients()); + int r2DSize = sizeof(r2.getDirections())/sizeof(*r2.getDirections()); + + if(r1.getName() == r2.getName && + r1.getYield() == r2.getYield() && + r1.getnumIngretients() == r2.getnumIngredients()) { + if(r1ISize != r2ISize) + return false; + + if(r1DSize != R2Size) + return false;s + + for(int i = 0; i < r1ISize; i++) + if (r1.getIngredients()[i] != r2.getIngredients()[i]) + return false; + + for(int i = 0; i < r2DSize; i++) + if (r1.getDirections()[i] != r2.getDirections()[i]) + return false; + return true; + + } else { + return false; + } +} + +bool searchFor(Recipe *pCurr, Recipe search) { + if(pCurr == NULL) { + } +} \ No newline at end of file diff --git a/Lab9/.vs/Lab9/v14/.suo b/Lab9/.vs/Lab9/v14/.suo new file mode 100644 index 0000000..b8395f6 Binary files /dev/null and b/Lab9/.vs/Lab9/v14/.suo differ diff --git a/Lab9/Debug/Lab9.exe b/Lab9/Debug/Lab9.exe new file mode 100644 index 0000000..0c9f95b Binary files /dev/null and b/Lab9/Debug/Lab9.exe differ diff --git a/Lab9/Debug/Lab9.ilk b/Lab9/Debug/Lab9.ilk new file mode 100644 index 0000000..eea9cb7 Binary files /dev/null and b/Lab9/Debug/Lab9.ilk differ diff --git a/Lab9/Debug/Lab9.pdb b/Lab9/Debug/Lab9.pdb new file mode 100644 index 0000000..f3d7288 Binary files /dev/null and b/Lab9/Debug/Lab9.pdb differ diff --git a/Lab9/Lab9.VC.db b/Lab9/Lab9.VC.db new file mode 100644 index 0000000..be2e9d1 Binary files /dev/null and b/Lab9/Lab9.VC.db differ diff --git a/Lab9/Lab9.sln b/Lab9/Lab9.sln new file mode 100644 index 0000000..fc77d3d --- /dev/null +++ b/Lab9/Lab9.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Lab9", "Lab9\Lab9.vcxproj", "{2DA505A9-098F-4813-9EEF-07D472B1096C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2DA505A9-098F-4813-9EEF-07D472B1096C}.Debug|x64.ActiveCfg = Debug|x64 + {2DA505A9-098F-4813-9EEF-07D472B1096C}.Debug|x64.Build.0 = Debug|x64 + {2DA505A9-098F-4813-9EEF-07D472B1096C}.Debug|x86.ActiveCfg = Debug|Win32 + {2DA505A9-098F-4813-9EEF-07D472B1096C}.Debug|x86.Build.0 = Debug|Win32 + {2DA505A9-098F-4813-9EEF-07D472B1096C}.Release|x64.ActiveCfg = Release|x64 + {2DA505A9-098F-4813-9EEF-07D472B1096C}.Release|x64.Build.0 = Release|x64 + {2DA505A9-098F-4813-9EEF-07D472B1096C}.Release|x86.ActiveCfg = Release|Win32 + {2DA505A9-098F-4813-9EEF-07D472B1096C}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Lab9/Lab9/Debug/Lab9.log b/Lab9/Lab9/Debug/Lab9.log new file mode 100644 index 0000000..aec5043 --- /dev/null +++ b/Lab9/Lab9/Debug/Lab9.log @@ -0,0 +1,4 @@ + main.cpp +c:\users\poile\documents\visual studio 2015\projects\lab9\lab9\main.cpp(24): warning C4018: '<': signed/unsigned mismatch + Lab9.vcxproj -> C:\Users\poile\documents\visual studio 2015\Projects\Lab9\Debug\Lab9.exe + Lab9.vcxproj -> C:\Users\poile\documents\visual studio 2015\Projects\Lab9\Debug\Lab9.pdb (Full PDB) diff --git a/Lab9/Lab9/Debug/Lab9.tlog/CL.command.1.tlog b/Lab9/Lab9/Debug/Lab9.tlog/CL.command.1.tlog new file mode 100644 index 0000000..bb9d73c Binary files /dev/null and b/Lab9/Lab9/Debug/Lab9.tlog/CL.command.1.tlog differ diff --git a/Lab9/Lab9/Debug/Lab9.tlog/CL.read.1.tlog b/Lab9/Lab9/Debug/Lab9.tlog/CL.read.1.tlog new file mode 100644 index 0000000..dcb4ad0 Binary files /dev/null and b/Lab9/Lab9/Debug/Lab9.tlog/CL.read.1.tlog differ diff --git a/Lab9/Lab9/Debug/Lab9.tlog/CL.write.1.tlog b/Lab9/Lab9/Debug/Lab9.tlog/CL.write.1.tlog new file mode 100644 index 0000000..73f1186 Binary files /dev/null and b/Lab9/Lab9/Debug/Lab9.tlog/CL.write.1.tlog differ diff --git a/Lab9/Lab9/Debug/Lab9.tlog/Lab9.lastbuildstate b/Lab9/Lab9/Debug/Lab9.tlog/Lab9.lastbuildstate new file mode 100644 index 0000000..9fb30b1 --- /dev/null +++ b/Lab9/Lab9/Debug/Lab9.tlog/Lab9.lastbuildstate @@ -0,0 +1,2 @@ +#TargetFrameworkVersion=v4.0:PlatformToolSet=v140:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=8.1 +Debug|Win32|C:\Users\poile\documents\visual studio 2015\Projects\Lab9\| diff --git a/Lab9/Lab9/Debug/Lab9.tlog/link.command.1.tlog b/Lab9/Lab9/Debug/Lab9.tlog/link.command.1.tlog new file mode 100644 index 0000000..c5c1946 Binary files /dev/null and b/Lab9/Lab9/Debug/Lab9.tlog/link.command.1.tlog differ diff --git a/Lab9/Lab9/Debug/Lab9.tlog/link.read.1.tlog b/Lab9/Lab9/Debug/Lab9.tlog/link.read.1.tlog new file mode 100644 index 0000000..a0f28f7 Binary files /dev/null and b/Lab9/Lab9/Debug/Lab9.tlog/link.read.1.tlog differ diff --git a/Lab9/Lab9/Debug/Lab9.tlog/link.write.1.tlog b/Lab9/Lab9/Debug/Lab9.tlog/link.write.1.tlog new file mode 100644 index 0000000..bbb077c Binary files /dev/null and b/Lab9/Lab9/Debug/Lab9.tlog/link.write.1.tlog differ diff --git a/Lab9/Lab9/Debug/Review.obj b/Lab9/Lab9/Debug/Review.obj new file mode 100644 index 0000000..743c129 Binary files /dev/null and b/Lab9/Lab9/Debug/Review.obj differ diff --git a/Lab9/Lab9/Debug/main.obj b/Lab9/Lab9/Debug/main.obj new file mode 100644 index 0000000..9afff88 Binary files /dev/null and b/Lab9/Lab9/Debug/main.obj differ diff --git a/Lab9/Lab9/Debug/vc140.idb b/Lab9/Lab9/Debug/vc140.idb new file mode 100644 index 0000000..b751754 Binary files /dev/null and b/Lab9/Lab9/Debug/vc140.idb differ diff --git a/Lab9/Lab9/Debug/vc140.pdb b/Lab9/Lab9/Debug/vc140.pdb new file mode 100644 index 0000000..23af821 Binary files /dev/null and b/Lab9/Lab9/Debug/vc140.pdb differ diff --git a/Lab9/Lab9/Lab9.vcxproj b/Lab9/Lab9/Lab9.vcxproj new file mode 100644 index 0000000..278376e --- /dev/null +++ b/Lab9/Lab9/Lab9.vcxproj @@ -0,0 +1,156 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + {2DA505A9-098F-4813-9EEF-07D472B1096C} + Win32Proj + Lab9 + 8.1 + + + + Application + true + v140 + Unicode + + + Application + false + v140 + true + Unicode + + + Application + true + v140 + Unicode + + + Application + false + v140 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + true + + + false + + + false + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + + + + + + + Level3 + Disabled + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + true + true + + + + + Level3 + + + MaxSpeed + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + true + true + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Lab9/Lab9/Lab9.vcxproj.filters b/Lab9/Lab9/Lab9.vcxproj.filters new file mode 100644 index 0000000..0569bcd --- /dev/null +++ b/Lab9/Lab9/Lab9.vcxproj.filters @@ -0,0 +1,36 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + \ No newline at end of file diff --git a/Lab9/Lab9/Review.cpp b/Lab9/Lab9/Review.cpp new file mode 100644 index 0000000..92c03e9 --- /dev/null +++ b/Lab9/Lab9/Review.cpp @@ -0,0 +1,18 @@ +#include "Review.h" + +/**DEEP COPY**/ +List::List(List ©) { + Node *pCur = copy.pHead; + Node *pMem = nullptr; + while (pCur != nullptr) { + pMem = new Node(*pCur); + //check head of list + //if yes + // pHead = pMem; + // pHead = pMem; + // else + // pTail ->getNext() = pMem; + // pTail = pMem; + // pCurr = pCurr->getNext(); + } +} \ No newline at end of file diff --git a/Lab9/Lab9/Review.h b/Lab9/Lab9/Review.h new file mode 100644 index 0000000..dcddda8 --- /dev/null +++ b/Lab9/Lab9/Review.h @@ -0,0 +1,37 @@ +#pragma once + +#include +#include +#include +#include +#include + +using std::getline; +using std::ifstream; +using std::ofstream; +using std::istringstream; +using std::stringstream; +using std::string; +using std::to_string; +using std::cout; +using std::cin; +using std::endl; + +using std::istream; + +class Node { + public: + Node() {}; + Node(Node ©) { this->pNext = copy.pNext; this->data = copy.data; }; + private: + Node *pNext; + int data; +}; + +class List { + public: + List() {}; + List(List ©); + private: + Node *pHead = (Node *)malloc(sizeof(Node)); +}; \ No newline at end of file diff --git a/Lab9/Lab9/Stack.h b/Lab9/Lab9/Stack.h new file mode 100644 index 0000000..19434fd --- /dev/null +++ b/Lab9/Lab9/Stack.h @@ -0,0 +1,79 @@ +// This file contains a stack class template. The underlying data structure for the +// stack is an array allocated from the heap. + +#pragma once + +#include +#include + +using std::cout; +using std::cin; +using std::endl; +using std::string; + +template +class Stack { +public: + Stack(int newSize = 0); + ~Stack(); + + bool push(T &newItem); + bool pop(T &poppedItem); + bool peek(T &item); + + bool isEmpty(); + +private: + int mSize; // represents the current number of items in the stack + int mMaxSize; // must not exceed the max size of our allocated array + T *mTop; // will point to contigous memory on the heap (an array) +}; + +template +Stack::Stack(int newSize) { + mSize = newSize; // this can also be used as the index to the top of the stack + mMaxSize = 100; + mTop = new T[100]; // allocating an array of 100 items of type T on the heap +} + +template +Stack::~Stack() { + delete[] mTop; // this is how we free up an array on the heap in C++ +} + +// Places the newItem at the top of the stack +template +bool Stack::push(T &newItem) { + if (mSize == mMaxSize) + return false; + mTop[mSize++] = newItem; + return true; +} + +// In this implementation you will apply defensive design. You must check to +// see if the stack is empty or not before you pop. Places the popped item in +// the parameter referred to as "poppedItem". Returns true if the item was popped; false +// otherwise. +template +bool Stack::pop(T &poppedItem) { + if (this->isEmpty()) + return false; + poppedItem = mTop[--mSize]; + return true; +} + +// In this implementation you will apply defensive design. You must check to +// see if the stack is empty or not before you peek. Places the item at the top of the +// stack in the parameter referred to as "item". Returns true if there +// is an item at the top; false otherwise. +template +bool Stack::peek(T &item) { + if (this->isEmpty()) + return false; + item = this->mTop[this->mSize - 1]; + return true; +} + +// Returns true if the stack is empty; false otherwise +template +bool Stack::isEmpty() { return !mSize; } \ No newline at end of file diff --git a/Lab9/Lab9/TestStack.h b/Lab9/Lab9/TestStack.h new file mode 100644 index 0000000..769dcd2 --- /dev/null +++ b/Lab9/Lab9/TestStack.h @@ -0,0 +1,34 @@ +#pragma once + +#include "Stack.h" + +template +class TestStack +{ +public: + TestStack(); + ~TestStack(); + void Test(T &item1, T &item2); +private: + Stack theStack; +}; + +template +TestStack::TestStack() : theStack(0) // this is initializing the newSize of the stack object to 0 +{ + +} + +template +TestStack::~TestStack() +{ + +} + +template +void TestStack::Test(T &item1, T &item2) +{ + theStack.push(item1); + theStack.peek(item2); + cout << "peek: " << item2 << endl; +} diff --git a/Lab9/Lab9/main.cpp b/Lab9/Lab9/main.cpp new file mode 100644 index 0000000..9120ed4 --- /dev/null +++ b/Lab9/Lab9/main.cpp @@ -0,0 +1,51 @@ +// This example illustrates how to define a Stack class template. + +#include "TestStack.h" +#include +using std::vector; +int sort(string input); + +int main(void) { + int item1 = -89, item2 = 104; + + sort("Hello"); + // vector my_vector; // vector<> is from the Standard Template Library (STL) + + TestStack tester; // STACK IS LIFO + + tester.Test(item1, item2); + + return 0; +} + +int sort(string input) { + Stack test; + vector split(input.begin(), input.end()); + + for (int i = 0; i < input.length(); i++) { + if (split[i] == '+' || split[i] == '-' || split[i] == '*' || split[i] == '/') { + int n1, n2, result; + test.pop(n1); + test.pop(n2); + switch (split[i]) { + case '+': + result = n1 + n2; + break; + case '-': + result = n1 - n2; + break; + case '*': + result = n1 * n2; + break; + case '/': + result = n1 / n2; + } + test.push(result); + } else { + int toPush = split[i]; + test.push(toPush); + } + } + + return 0; +} \ No newline at end of file diff --git a/PA7/.vs/PA7/v14/.suo b/PA7/.vs/PA7/v14/.suo new file mode 100644 index 0000000..66c8c92 Binary files /dev/null and b/PA7/.vs/PA7/v14/.suo differ diff --git a/PA7/Debug/.vs/PA7/v14/.suo b/PA7/Debug/.vs/PA7/v14/.suo new file mode 100644 index 0000000..048e4b9 Binary files /dev/null and b/PA7/Debug/.vs/PA7/v14/.suo differ diff --git a/PA7/Debug/PA7.exe b/PA7/Debug/PA7.exe new file mode 100644 index 0000000..4da1c62 Binary files /dev/null and b/PA7/Debug/PA7.exe differ diff --git a/PA7/Debug/PA7.ilk b/PA7/Debug/PA7.ilk new file mode 100644 index 0000000..6a5351d Binary files /dev/null and b/PA7/Debug/PA7.ilk differ diff --git a/PA7/Debug/PA7.pdb b/PA7/Debug/PA7.pdb new file mode 100644 index 0000000..a2ef6ff Binary files /dev/null and b/PA7/Debug/PA7.pdb differ diff --git a/PA7/PA7.VC.db b/PA7/PA7.VC.db new file mode 100644 index 0000000..26dc974 Binary files /dev/null and b/PA7/PA7.VC.db differ diff --git a/PA7/PA7.sln b/PA7/PA7.sln new file mode 100644 index 0000000..7784c84 --- /dev/null +++ b/PA7/PA7.sln @@ -0,0 +1,28 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25420.1 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PA7", "PA7\PA7.vcxproj", "{E212C384-3611-4B9B-9913-47FD17CB4B2A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {E212C384-3611-4B9B-9913-47FD17CB4B2A}.Debug|x64.ActiveCfg = Debug|x64 + {E212C384-3611-4B9B-9913-47FD17CB4B2A}.Debug|x64.Build.0 = Debug|x64 + {E212C384-3611-4B9B-9913-47FD17CB4B2A}.Debug|x86.ActiveCfg = Debug|Win32 + {E212C384-3611-4B9B-9913-47FD17CB4B2A}.Debug|x86.Build.0 = Debug|Win32 + {E212C384-3611-4B9B-9913-47FD17CB4B2A}.Release|x64.ActiveCfg = Release|x64 + {E212C384-3611-4B9B-9913-47FD17CB4B2A}.Release|x64.Build.0 = Release|x64 + {E212C384-3611-4B9B-9913-47FD17CB4B2A}.Release|x86.ActiveCfg = Release|Win32 + {E212C384-3611-4B9B-9913-47FD17CB4B2A}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/PA7/PA7/BST.cpp b/PA7/PA7/BST.cpp new file mode 100644 index 0000000..e43f850 --- /dev/null +++ b/PA7/PA7/BST.cpp @@ -0,0 +1,120 @@ +/********************************************************************* + * Programmer: Benjamin Poile + * Class : CptS 122, Spring 2018 + * Programming Assignment : PA 7 + * Date : Mar 28th, 2018 + * Credits: Andrew O'Fallon for instructions. + * Using code written in lab with Alexa, Jeff, and Brandon. + **********************************************************************/ + +/**IMPORTS**/ +#include "BST.h" + +/**CONSTRUCTORS & DESTRUCTORS**/ +BST::BST() { + Data unsortedMorse[39]; + string line, lineData; + int index = 0, size = sizeof(unsortedMorse) / sizeof(*unsortedMorse); + ifstream morseData("MorseTable.txt"); + + while (getline(morseData, line, '\n')) { + istringstream morseStream(line); + + getline(morseStream, lineData, ' '); + unsortedMorse[index].letter = lineData.c_str()[0]; + + getline(morseStream, lineData, ' '); + unsortedMorse[index].morse = lineData; + + index++; + } + + sort(unsortedMorse, unsortedMorse + size, compareAscii); + + this->mpRoot = (BSTNode *)malloc(sizeof(BSTNode)); + this->mpRoot = new BSTNode(); + + insertR(unsortedMorse, 0, size / 2, size - 1); + insert(unsortedMorse[38]); +} + +BST::BST(BSTNode *©) { this->mpRoot = copy; } + +BST::~BST() { destroyBST(this->mpRoot); } + +void BST::destroyBST(BSTNode *pTree) { + if (pTree != NULL) { + destroyBST(pTree->getLeft()); + destroyBST(pTree->getRight()); + delete pTree; + } +} + +/**SETTERS**/ +void BST::insertR(Data arr[], int startIndex, int middleIndex, int endIndex) { + int firstHalfLen = middleIndex - startIndex + 1; + int secondHalfLen = endIndex - middleIndex; + + if (endIndex > 39 || startIndex < 0 || endIndex - startIndex <= 1) { + if (endIndex - startIndex == 1) + insert(arr[startIndex]); + return; + } + + Data *firstHalf = new Data[firstHalfLen], + *secondHalf = new Data[secondHalfLen]; + + for (int i = 0; i < firstHalfLen; i++) + firstHalf[i] = arr[startIndex + i]; + + for (int i = 0; i < secondHalfLen; i++) + secondHalf[i] = arr[middleIndex + i + 1]; + + insert(arr[middleIndex]); + + insertR(firstHalf, 0, firstHalfLen / 2, firstHalfLen - 1); + insertR(secondHalf, 0, secondHalfLen / 2, secondHalfLen - 1); +} + +void BST::insert(Data &newData) { insertHelper(mpRoot, newData); } + +void BST::insertHelper(BSTNode *&pTree, Data &newData) { + if (pTree == nullptr) + pTree = new BSTNode(newData); + else if (newData.letter < pTree->getData().letter) + insertHelper(pTree->getLeft(), newData); + else + insertHelper(pTree->getRight(), newData); +} + +/**GETTERS**/ +bool BST::isEmpty() { return (this->mpRoot == nullptr); } + +bool compareAscii(Data lhs, Data rhs) { return (int)lhs.letter < (int)rhs.letter; } + +void BST::print() const { printHelper(this->mpRoot, 0); } + +void BST::printHelper(BSTNode *pTree, int indent) const { + if (pTree != nullptr) { + printHelper(pTree->getLeft(), indent + 4); + + if(indent) + cout << std::setw(indent) << " "; + cout << pTree->getData().letter << endl << " "; + + printHelper(pTree->getRight(), indent + 4); + } + cout << endl; +} + +string BST::search(char query) { return searchHelper(this->mpRoot, toupper(query)); } + +string BST::searchHelper(BSTNode *pTree, char query) { + if (pTree != nullptr) + if (pTree->getData().letter == query) + return pTree->getData().morse; + else if (query < pTree->getData().letter) + return searchHelper(pTree->getLeft(), query); + else + return searchHelper(pTree->getRight(), query); +} \ No newline at end of file diff --git a/PA7/PA7/BST.h b/PA7/PA7/BST.h new file mode 100644 index 0000000..bbc3b64 --- /dev/null +++ b/PA7/PA7/BST.h @@ -0,0 +1,46 @@ +/********************************************************************* + * Programmer: Benjamin Poile + * Class : CptS 122, Spring 2018 + * Programming Assignment : PA 7 + * Date : Mar 28th, 2018 + * Credits: Andrew O'Fallon for instructions. + * Using code written in lab with Alexa, Jeff, and Brandon. + **********************************************************************/ + +/**IMPORTS**/ +#include "Resources.h" +#include "BSTNode.h" + +#include + +class BST { + public: + /**CONSTRUCTORS & DESTRUCTORS**/ + BST(); + BST(BSTNode *©); + ~BST(); + + /**SETTERS**/ + void insert(Data &newData); + + /**GETTERS**/ + bool isEmpty(); + void print() const; // some print code borrowed from StackOverflow + string search(char query); + private: + BSTNode *mpRoot; + + /**DESTRUCTOR**/ + void destroyBST(BSTNode *pTree); + + /**SETTERS**/ + void insertHelper(BSTNode *&pTree, Data &newData); + void insertR(Data arr[], int startIndex, int middleIndex, int endIndex); + + /**GETTERS**/ + string searchHelper(BSTNode *pTree, char query); + void printHelper(BSTNode *pTree, int indent) const; +}; + +/**NON MEMBER FUNCTIONS**/ +bool compareAscii(Data lhs, Data rhs); // for sorting before inserting \ No newline at end of file diff --git a/PA7/PA7/BSTNode.cpp b/PA7/PA7/BSTNode.cpp new file mode 100644 index 0000000..b1fca16 --- /dev/null +++ b/PA7/PA7/BSTNode.cpp @@ -0,0 +1,33 @@ +/********************************************************************* + * Programmer: Benjamin Poile + * Class : CptS 122, Spring 2018 + * Programming Assignment : PA 7 + * Date : Mar 28th, 2018 + * Credits: Andrew O'Fallon for instructions. + * Using code written in lab with Alexa, Jeff, and Brandon. + **********************************************************************/ + +/**IMPORTS**/ +#include "BSTNode.h" + +/**CONSTRUCTORS**/ +BSTNode::BSTNode() { this->mpLeft = this->mpRight = nullptr; } + +BSTNode::BSTNode(Data &newData) { + this->mpLeft = nullptr; + this->mpRight = nullptr; + this->data = newData; +} + +/**GETTERS**/ +const Data BSTNode::getData() { return this->data; } + +BSTNode *& BSTNode::getLeft() { return this->mpLeft; } + +BSTNode *& BSTNode::getRight() { return this->mpRight; } + +/**NON MEMBER FUNCTIONS**/ +ostream &operator<<(ostream &out, BSTNode &node) { + node.getData().morse; + return out; +} diff --git a/PA7/PA7/BSTNode.h b/PA7/PA7/BSTNode.h new file mode 100644 index 0000000..904a750 --- /dev/null +++ b/PA7/PA7/BSTNode.h @@ -0,0 +1,30 @@ +/********************************************************************* + * Programmer: Benjamin Poile + * Class : CptS 122, Spring 2018 + * Programming Assignment : PA 7 + * Date : Mar 28th, 2018 + * Credits: Andrew O'Fallon for instructions. + * Using code written in lab with Alexa, Jeff, and Brandon. + **********************************************************************/ + +/**IMPORTS**/ +#include "Resources.h" + +class BSTNode { + public: + /**CONSTRUCTORS**/ + BSTNode(); + BSTNode(Data &newData); + + /**GETTERS**/ + const Data getData(); + BSTNode *&getLeft(); + BSTNode *&getRight(); + private: + Data data; + BSTNode *mpLeft; + BSTNode *mpRight; +}; + +/**NON MEMBER FUNCTIONS**/ +ostream &operator<<(ostream &out, BSTNode &node); diff --git a/PA7/PA7/Convert.txt b/PA7/PA7/Convert.txt new file mode 100644 index 0000000..12d9295 --- /dev/null +++ b/PA7/PA7/Convert.txt @@ -0,0 +1,2 @@ +This is a test of the cpts 122 +Morse code conversion tool. \ No newline at end of file diff --git a/PA7/PA7/Debug/BST.obj b/PA7/PA7/Debug/BST.obj new file mode 100644 index 0000000..1b43a8e Binary files /dev/null and b/PA7/PA7/Debug/BST.obj differ diff --git a/PA7/PA7/Debug/BSTNode.obj b/PA7/PA7/Debug/BSTNode.obj new file mode 100644 index 0000000..84669bb Binary files /dev/null and b/PA7/PA7/Debug/BSTNode.obj differ diff --git a/PA7/PA7/Debug/Functions.obj b/PA7/PA7/Debug/Functions.obj new file mode 100644 index 0000000..b104d72 Binary files /dev/null and b/PA7/PA7/Debug/Functions.obj differ diff --git a/PA7/PA7/Debug/Main.obj b/PA7/PA7/Debug/Main.obj new file mode 100644 index 0000000..5ddce7f Binary files /dev/null and b/PA7/PA7/Debug/Main.obj differ diff --git a/PA7/PA7/Debug/PA7.log b/PA7/PA7/Debug/PA7.log new file mode 100644 index 0000000..b349f52 --- /dev/null +++ b/PA7/PA7/Debug/PA7.log @@ -0,0 +1,8 @@ + Main.cpp +c:\users\poile\documents\visual studio 2015\projects\pa7\pa7\main.cpp(10): warning C4067: unexpected tokens following preprocessor directive - expected a newline +c:\users\poile\documents\visual studio 2015\projects\pa7\pa7\main.cpp(19): warning C4018: '<': signed/unsigned mismatch + Generating Code... + Skipping... (no relevant changes detected) + Functions.cpp + PA7.vcxproj -> C:\Users\poile\documents\visual studio 2015\Projects\PA7\Debug\PA7.exe + PA7.vcxproj -> C:\Users\poile\documents\visual studio 2015\Projects\PA7\Debug\PA7.pdb (Full PDB) diff --git a/PA7/PA7/Debug/PA7.tlog/CL.command.1.tlog b/PA7/PA7/Debug/PA7.tlog/CL.command.1.tlog new file mode 100644 index 0000000..a04a419 Binary files /dev/null and b/PA7/PA7/Debug/PA7.tlog/CL.command.1.tlog differ diff --git a/PA7/PA7/Debug/PA7.tlog/CL.read.1.tlog b/PA7/PA7/Debug/PA7.tlog/CL.read.1.tlog new file mode 100644 index 0000000..ff8f099 Binary files /dev/null and b/PA7/PA7/Debug/PA7.tlog/CL.read.1.tlog differ diff --git a/PA7/PA7/Debug/PA7.tlog/CL.write.1.tlog b/PA7/PA7/Debug/PA7.tlog/CL.write.1.tlog new file mode 100644 index 0000000..dce5e33 Binary files /dev/null and b/PA7/PA7/Debug/PA7.tlog/CL.write.1.tlog differ diff --git a/PA7/PA7/Debug/PA7.tlog/PA7.lastbuildstate b/PA7/PA7/Debug/PA7.tlog/PA7.lastbuildstate new file mode 100644 index 0000000..c0eca64 --- /dev/null +++ b/PA7/PA7/Debug/PA7.tlog/PA7.lastbuildstate @@ -0,0 +1,2 @@ +#TargetFrameworkVersion=v4.0:PlatformToolSet=v140:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=8.1 +Debug|Win32|C:\Users\poile\documents\visual studio 2015\Projects\PA7\| diff --git a/PA7/PA7/Debug/PA7.tlog/link.command.1.tlog b/PA7/PA7/Debug/PA7.tlog/link.command.1.tlog new file mode 100644 index 0000000..b41537b Binary files /dev/null and b/PA7/PA7/Debug/PA7.tlog/link.command.1.tlog differ diff --git a/PA7/PA7/Debug/PA7.tlog/link.read.1.tlog b/PA7/PA7/Debug/PA7.tlog/link.read.1.tlog new file mode 100644 index 0000000..cdba7b4 Binary files /dev/null and b/PA7/PA7/Debug/PA7.tlog/link.read.1.tlog differ diff --git a/PA7/PA7/Debug/PA7.tlog/link.write.1.tlog b/PA7/PA7/Debug/PA7.tlog/link.write.1.tlog new file mode 100644 index 0000000..cfd2b6e Binary files /dev/null and b/PA7/PA7/Debug/PA7.tlog/link.write.1.tlog differ diff --git a/PA7/PA7/Debug/Resources.obj b/PA7/PA7/Debug/Resources.obj new file mode 100644 index 0000000..dc2b160 Binary files /dev/null and b/PA7/PA7/Debug/Resources.obj differ diff --git a/PA7/PA7/Debug/vc140.idb b/PA7/PA7/Debug/vc140.idb new file mode 100644 index 0000000..6910632 Binary files /dev/null and b/PA7/PA7/Debug/vc140.idb differ diff --git a/PA7/PA7/Debug/vc140.pdb b/PA7/PA7/Debug/vc140.pdb new file mode 100644 index 0000000..473c34e Binary files /dev/null and b/PA7/PA7/Debug/vc140.pdb differ diff --git a/PA7/PA7/Main.cpp b/PA7/PA7/Main.cpp new file mode 100644 index 0000000..3786742 --- /dev/null +++ b/PA7/PA7/Main.cpp @@ -0,0 +1,30 @@ +/********************************************************************* + * Programmer: Benjamin Poile + * Class : CptS 122, Spring 2018 + * Programming Assignment : PA 7 + * Date : Mar 28th, 2018 + * Credits: Andrew O'Fallon for instructions. + * Using code written in lab with Alexa, Jeff, and Brandon. + **********************************************************************/ + +#include "BST.h"; + +int main(void) { + BST *pTree = new BST(); // Master Tree + + string toConvert; // Input, unconverted string + ifstream infile("Convert.txt"); // Plaintext + + // Convert, line by line, the plaintext file + while (getline(infile, toConvert, '\n')) { + for (int i = 0; i < toConvert.length(); i++) { + if (toConvert[i] == *" ") + cout << " "; + else + cout << pTree->search(toConvert[i]) << " "; + } + cout << endl; + } + + return 0; +} \ No newline at end of file diff --git a/PA7/PA7/MorseTable.txt b/PA7/PA7/MorseTable.txt new file mode 100644 index 0000000..7228804 --- /dev/null +++ b/PA7/PA7/MorseTable.txt @@ -0,0 +1,39 @@ +A .- +B -... +C -.-. +D -.. +E . +F ..-. +G --. +H .... +I .. +J .--- +K -.- +L .-.. +M -- +N -. +O --- +P .--. +Q --.- +R .-. +S ... +T - +U ..- +V ...- +W .-- +X -..- +Y -.-- +Z --.. +0 ----- +1 .---- +2 ..--- +3 ...-- +4 ....- +5 ..... +6 -.... +7 --... +8 ---.. +9 ----. +. .-.-.- +, --..-- +? ..--.. \ No newline at end of file diff --git a/PA7/PA7/PA7.vcxproj b/PA7/PA7/PA7.vcxproj new file mode 100644 index 0000000..7c196f7 --- /dev/null +++ b/PA7/PA7/PA7.vcxproj @@ -0,0 +1,162 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + {E212C384-3611-4B9B-9913-47FD17CB4B2A} + Win32Proj + PA7 + 8.1 + + + + Application + true + v140 + Unicode + + + Application + false + v140 + true + Unicode + + + Application + true + v140 + Unicode + + + Application + false + v140 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + true + + + false + + + false + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + + + + + + + Level3 + Disabled + _DEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + true + true + + + + + Level3 + + + MaxSpeed + true + true + NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + + + Console + true + true + true + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/PA7/PA7/PA7.vcxproj.filters b/PA7/PA7/PA7.vcxproj.filters new file mode 100644 index 0000000..a0155e9 --- /dev/null +++ b/PA7/PA7/PA7.vcxproj.filters @@ -0,0 +1,50 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Resource Files + + + Resource Files + + + \ No newline at end of file diff --git a/PA7/PA7/Resources.h b/PA7/PA7/Resources.h new file mode 100644 index 0000000..dcb3caf --- /dev/null +++ b/PA7/PA7/Resources.h @@ -0,0 +1,35 @@ +/********************************************************************* + * Programmer: Benjamin Poile + * Class : CptS 122, Spring 2018 + * Programming Assignment : PA 7 + * Date : Mar 28th, 2018 + * Credits : Andrew O'Fallon for instructions. + * Using code written in lab with Alexa, Jeff, and Brandon. + **********************************************************************/ + +#pragma once + +/**IMPORTS**/ +#include +#include +#include +#include +#include + +/**NAMESPACE USES**/ +using std::cin; +using std::cout; +using std::endl; +using std::string; +using std::ostream; +using std::getline; +using std::sort; + +using std::istringstream; +using std::ifstream; + +/**GLOBAL DATA**/ +typedef struct data { + string morse; + char letter; +} Data; \ No newline at end of file