When the input will stop?
问题 Hi guys i have the following question: string s; std::cout << "give me a string" << std::endl; while (std::cin >> s){ std::cout << "give me a string" << std::endl; } cin.clear(); if s was an integer then i know that if i typed a char then the while would break. If it was an integer and typed a double the same would happened. But what about strings ?? Somewhere I read that in windows (as I am writting at netbeans in windows) you have to press ctrl+z and then it stops as it is taken as a false