[c++] Checking cin input stream produces an integer