This is pretty much what was given to us, I cannot get this to work... it just hangs when i open the input file.
Code:void FillParallelVectors (string& CustomerName, int& AccountNumber, double& BeginningBalance, int& Count, int& NumberOfItems, vector <int>& CheckNumberVector, vector <double>& AmountVector) { ifstream AccountInfoFile; OpenInputFile (AccountInfoFile); Count = 0; NumberOfItems = 0; AccountInfoFile >> CustomerName >> AccountNumber >> BeginningBalance; AccountInfoFile >> CheckNumberVector [Count] >> AmountVector [Count]; while (!AccountInfoFile.eof ()) { Count ++; if (Count >= CheckNumberVector.size ()) { CheckNumberVector.resize (2 * CheckNumberVector.size ()); AmountVector.resize (2 * AmountVector.size ()); } AccountInfoFile >> CheckNumberVector [Count] >> AmountVector [Count]; NumberOfItems ++; } AccountInfoFile.close (); }



LinkBack URL
About LinkBacks


