I read a c++ book and it shows this code,
#include <iostream>
int main()
{
int total, choice;
std::cin >> total >> choice;
if (!std::cin) //bad input
{
std::cout <<total << choice;
}
}
Actually, I don't know what is good input and bad input because no matter what I input, it still cannot cout, so how to output a 'good' input?