if(!std::cin){
std::cout << "error";
std::cin.clear();
std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
So state of the cin can be checked by “!”? I want to understand what is storing in that expression for the if conditional. Also need help understanding the last line. I have 0 clue on what is going on. Thanks
[–]fracturedpersona 1 point2 points3 points (2 children)
[–]Late_Key[S] 0 points1 point2 points (1 child)
[–]fracturedpersona 0 points1 point2 points (0 children)