|
-
October 4th, 2010, 06:03 PM
#2
Re: String problem after space
Please post the entire program. There is probably some other stdin operation that you didn't post. We can only guess as to what the problem is but it sounds like it is one of those asked and answered about a million times questions. The below example is using cin but you get the same problem if you use cin for an integral value followed by getline for a string. There are certain types of input operations that leave a '\n' in the input stream which causes the next getline to read a blank line.
http://www.parashift.com/c++-faq-lit....html#faq-15.6
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|