Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Noods

cin.getline....?????

This topic is 6245 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Anybody know why your program would totally skip a cin.getline??? The code is cool, straight out of the book. I also print what is stored in the variable. All the correct headers are included. Nothing. I just cant find out why my cin.getline is being totally skipped when I run the program. Thanks in advance. -Noods

Share this post


Link to post
Share on other sites
Advertisement
Never mind guys, I found the problem. The cin.getline wanst being accepted because I omitted the termination character. To bypass any problems, make sure you specify the termination character when using cin.getline. Thanks anyway!

-Noods

Share this post


Link to post
Share on other sites
You shouldn''t have to specify the terminator if you want it to be \n. Perhaps a previous read operation had left a newline in the buffer. Also, make sure you have applied the patches at the Dinkumware STL site if you''re using VC5 or VC6.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!