#include #include #include #include using namespace std; class ArrayMaster{ private: public: int capacity; ArrayMaster(); ~ArrayMaster(); Item **pitem;//2 stars to know that this pointer points to a pointer Item **temppitem; //int returnCapacity(); void storeItem(string catagory,string description, string priority); string returnBoxContents(bool detailed=0, int menuChoice=0, bool all=0); void resize(int &capacity, int newcapacity); void deleteItem(int menuChoice); void loadFile(); void saveToFile(); }; =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= #include"ArrayMaster.h" ArrayMaster::ArrayMaster(){ pitem = new Item*[1];//a pointer to an array of pointers the size of item objects } void ArrayMaster::resize(int &capacity, int newcapacity){//got to keep capacity updated capacity=newcapacity; temppitem = new Item*[capacity]; for (int i=0; i1){ resize(capacity,capacity++); (*pitem)[capacity].setAll(catagory, description, priority); } else{cout<<"\nTEST1\n"; pitem[0]->setAll(catagory, description, priority);///////////////////////////CRASH cout<<"\nTEST2\n";} } string ArrayMaster::returnBoxContents(bool detailed, int menuChoice, bool all){ stringstream itemInformation; do{ cout<>catagory>>description>>priority; storeItem(catagory,description, priority); } inStream.close(); } void ArrayMaster::saveToFile(){//this does NOT erase file prior to saving. ofstream outStream; outStream.open("userFile.txt"); int counter=0; while(counter