The problem I'm having is that I want to see exactly what's in the input buffer when a person types something into the console The only way I know how to see it is by either std::cin::getline() or std::getline(), but I think both of these write to either a char pointer or std::string object based on what system-specific end-of-line characters are appropriate. For example, I think on Windows if you hit enter on the console it'll input '\r''\n', but when I try to read it from the char pointer or the string object they don't show any '\r'. For example if I type the word hello in the console, I suspect that windows puts:
'h' 'e' 'l' 'l' 'o' '\r' '\n'
into the buffer, but in the char pointer or the string object I only see "hello". I basically want to SEE what's in the input buffer. Can I extract each character from the buffer one by one in a loop, in a way that it doesn't throw out whitespace characters?
I think this should work: