Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C++ Strings

Name: Anonymous 2006-03-09 6:24

Ok, I have some code that receives user input like this
getline(cin, tmptxt, '\n')

But every time I do this it returns null, and if I just do a old fashioned
cin >> tmptxt;

This one ends the string at the first space, like if I type 'how do i shot web' it will return as 'how'. I have tried this in C++ Strings and C-styled strings (char)

Another odd thing, if I run the first code posted in its own program, it works fine, but when I implement it to the program I am working on, it refuses to work. Is this my fault or somthing beyond my control?

Name: Anonymous 2006-03-09 8:23

anonymous, you are a god, thanks you

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List