View Single Post
Old 09-23-07, 07:58 AM   #11
Registered User
six_storm's Avatar
Join Date: Jun 2004
Location: Nashvegas
Posts: 11,575
Send a message via Skype™ to six_storm
Default Re: C++ Gurus, School Me :D

Originally Posted by Imbroglio
why not just use getline? and then parse it per the tokens you want?

syntax is getline(stream, string var);

the function reads the entire line until '\n' is hit and puts it into the string variable (if i remember correctly '\n' is trunced from the end of the string, so you may or may not need to add it depending on formatting specs)
I changed it to a getline and then did a strcpy. I finally got 95% of the program to work correctly, but my indentation didn't turn out so well. Most of the time, my C++ problems are just a stupid bracket or colon lol. Thanks anyways guys!
six_storm is offline   Reply With Quote