int Finish()//outputs stored values to file
{
ofstream walletfile;
walletfile.open("C:/accounts/wallet.acnt", ios::trunc);
walletfile << wallet;
walletfile.close();
ofstream accountfile;
accountfile.open("C:/accounts/account.acnt", ios::trunc);
accountfile << account;
accountfile.close();
ofstream savingsfile;
savingsfile.open("C:/accounts/savings.acnt", ios::trunc);
savingsfile << savings;
savingsfile.close();
return 0;
}
I am a brand new programmer, just learning from the web, i wrote this function as part of an accounting program to write stored values to an output file, the program compiles, and runs without any problems, but when i activate this function from within the program nothing happens, when i retrieve the values from the file, they are exactly the same as the last time i drew from the file. HELP!