Originally Posted by
tabstop
Okay, I didn't read your code carefully enough and didn't realize your input loop was as broken as it is. Your read loop doesn't stop on new lines as such, only when 99999 characters are read -- the only reason you're seeing something like what you want is that the input is buffered. If you want to read a line at a time, use getline(); if you're trying to read one character at a time without them having to hit enter, then you'll need to get into system-specific things.