Thread: How to read files?

  1. #16
    Registered User
    Join Date
    Nov 2005
    Posts
    673
    Yes, Now i understand that but how is it that I read another line than just the first?

  2. #17
    Registered User
    Join Date
    Jan 2005
    Posts
    7,366
    If you use >> it will automatically skip to the next line if the rest of the current line is empty or only has whitespace. You can also use the getline function, but that isn't necessary as long as each piece of text you read in is one word long with no spaces (actually you should change High Elf to High-Elf if you want to avoid the need to use getline).

  3. #18
    Registered User
    Join Date
    Nov 2005
    Posts
    673
    lol, i feel stupid now. Thank you alot for the info guys. I guess that concludes this thread as far as I can tell. (Unless someone has something else to say of course.) Again Thanks everybody.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Read Only files
    By DominicTrix in forum C++ Programming
    Replies: 4
    Last Post: 12-11-2004, 02:55 AM
  2. using threads to write & read from files
    By kishorepalle in forum C Programming
    Replies: 4
    Last Post: 10-19-2004, 05:19 PM
  3. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 09:54 AM
  4. trying to read all asci char's in files
    By brane_sail in forum C++ Programming
    Replies: 1
    Last Post: 09-02-2002, 11:33 AM
  5. Replies: 1
    Last Post: 07-24-2002, 06:33 AM