This is probably pretty simple... This is my first year of dedicated learing C++ though, so give me some slack please. :P Well, i'm basically making a checkbooking program to create an example of using <fstream> to get better at it and such. I have most of my program working, but the error I have is when I try to read the file. (I'm storing information to a file to allow it to save for the next time I run the program.) Ive narrowed the error to my reading file function... Here's the code:
Code:
void display_transactions()
{
ifstream fin;
string book;
fin.open("money.text"); // Opens record file
do{ // Loop to be sure to read the WHOLE file
fin >> book; // Saves the line
cout << endl << book << endl; // Prints the line
}while(fin.eof() == FALSE);
fin.close(); // Closes file
}
I would appreciate any ideas on how to fix this... Thanks!