The istream object has a member function called "get()" that can do this: http://www.cplusplus.com/reference/istream/istream/get/ std::cin is an istream object. This function does not skip whitespace and it will take the next input from the buffer even if you did not want it to be there.