Problems with getline()?
So, after finally figuring out how to read input with spaces, I end up with a second problem: I have to hit the enter key twice for the system to finally get the line.
That's my code. Whenever I enter something, I hit the enter key, and nothing happens. When I hit it a second time, it shows the output from the cout. Any ideas?
using namespace std;
cout << s;
Let me guess, you're using Visual Studio 6? I believe it's a bug in that. Maybe a service pack will fix? Not sure.
Knowledge Base Article #240015 for fix.
p.s. try that link a few times or goto MS & search for 240015
the link is flaky for some reason.
lots of thanks, guys. This was driving me crazy.