View Single Post
Join Date: Oct 2007
Posts: 30
Reputation: cl3m0ns is an unknown quantity at this point 
Solved Threads: 0
cl3m0ns's Avatar
cl3m0ns cl3m0ns is offline Offline
Light Poster

Re: Reading/writing .txt files into an array

 
0
  #3
Dec 2nd, 2007
Originally Posted by Ancient Dragon View Post
That while statement on line 13 is incorrect because eof() doesn't work like that. Instead, code it something like this
  1. string line;
  2. while(getline(infile, line) )
  3. {
  4. // now split this string into individual parts for the structure
  5. }
Thanks for that but do you know how to write the information into an array? Or for that matter how to split this string into individual parts for the structure?
Reply With Quote