I have to have this in at 12EST and my group has abandoned me completely for this project. I have it down except that the information in my .txt file won't load correctly and I have no idea how to format it. Here is the code to read the file:
Is it my code? Should I just separate the data with spaces in Notepad? Any help would be appreciated!Code:void initializeVectors(vector<string>& pID, vector<string>& pName, vector<int>& itemsOrdered, vector<int>& itemsInStore, vector<int>& piecesSold, vector<double>& manufacturePrice, vector<double>& sellPrice, int listSize) { int count; ifstream infile; infile.open("C:\\Documents and Settings\\Andrea\\My Documents\\hardwareStore.txt"); for(count=0; count<listSize; count++) { infile>>pID[count]; infile>>itemsOrdered[count]; infile>>itemsInStore[count]; infile>>piecesSold[count]; infile>>manufacturePrice[count]; infile>>sellPrice[count]; } for(count=0; count<listSize; count++) { infile>>pName[count]; } }



LinkBack URL
About LinkBacks


