problem here

Started by
7 comments, last by phil05 20 years, 1 month ago
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..?
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.
err, I know I''ve come across this before, but try doing a simple cin.ignore() call right after the getline call.
Well, R2D22U2..
I''m using visual studio 6.0 pro. And cin.ignore() didn''t do anything, but executed fine. Still, the same problem occures.
Dinkumware''s VC++ 6.0 STL Fixes
Write down what helps w/ this subject instead of giving me links that discuss several problems. It''s annoying, but thanks though.
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.
This is for SP3, when I have SP5. It''s still needed?
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]

This topic is closed to new replies.

Advertisement