View Single Post
Join Date: May 2008
Posts: 33
Reputation: gotm is an unknown quantity at this point 
Solved Threads: 0
gotm gotm is offline Offline
Light Poster

Re: Segmentation Fault error

 
0
  #3
Dec 3rd, 2008
Originally Posted by nmaillet View Post
The problem is with line 203. You're trying the assign the value of newAccount to memory outside the bounds of the vector's array. Use account_Names.push_back(newAccount) instead, and it should reallocate the memory for you.

Nick
Thank you so much that fixed it. I have one more question though. The loop after that section where I am writing to the file. When the program finishes, and I looked at the file, it has one line with just the first line of the original file in it. From the program you can probably see what I want it to do, which is just append pretty much one more line of info to the file, even though the way I have it set up to do it is rewrite the whole thing line by line.

Any help on this?
Reply With Quote