View Single Post
Join Date: Aug 2008
Posts: 83
Reputation: nmaillet is an unknown quantity at this point 
Solved Threads: 18
nmaillet nmaillet is offline Offline
Junior Poster in Training

Re: Segmentation Fault error

 
0
  #4
Dec 3rd, 2008
No problem, and try this:
  1. logFileOut.open ("logfile.txt");
  2. for (int write=0;write<account_Names.size();write++)
  3. {
  4. logFileOut << account_Numbers[write] << ":" << account_Names[write] << ":" << account_Dates[write] << ":" << account_Tran[write] << ":" << amount[write] << "\n";
  5. }
  6. logFileOut.close();
You were closing the file with each iteration.

Nick
Reply With Quote