Jump to content
  • Advertisement

Archived

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

phil05

problem here

This topic is 5179 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

std::getline(std::cin,buffer); After pressing enter, it waits for you to press another ''enter'' til it goes to the person''s response. I thought there was something like cin.put(''\n'') or something relating..?

Share this post


Link to post
Share on other sites
Advertisement
What compiler are you using? IIRC, MSVC 6 has a bug in it''s input stream implementation that sounds like it might cause something like that.

Share this post


Link to post
Share on other sites
err, I know I''ve come across this before, but try doing a simple cin.ignore() call right after the getline call.

Share this post


Link to post
Share on other sites
I''m using visual studio 6.0 pro. And cin.ignore() didn''t do anything, but executed fine. Still, the same problem occures.

Share this post


Link to post
Share on other sites
Write down what helps w/ this subject instead of giving me links that discuss several problems. It''s annoying, but thanks though.

Share this post


Link to post
Share on other sites
quote:
Original post by philvaira
Write down what helps w/ this subject instead of giving me links that discuss several problems. It''s annoying, but thanks though.
Are you dumb? That is a link to the fixes for the version of STL, supplied by Dinkumware, that ships with VC 6.0. It''s broken, most commonly manifest in the form of requiring an additional input character on std::getline.

What, you want me to spoonfeed you? Ingrate brat.

Share this post


Link to post
Share on other sites
That seems obvious, considering its not working for you.

Later,
Lord Hen

"I am free of all prejudices. I hate everyone equally." - W. C. Fields

[edited by - Lord Hen on December 2, 2008 2:32:49 AM]

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!