inputting characters
I''m using plain iso c/c++, i''ve tried getchar, scanf, and cin, but it doesn''t accept spaces, eg: type in "test", it prints out test on a new line, but if I input "te st"(no quotes, of course), it outputs te, the prompt I put in, and then st. The only exception is when I get the chars one at a time, it crashes(Segmentation fault, I''m using linux). What''s going on?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement