I want to know which is better method to validate input:
int x; while(true){ std::cout << "x: "; if(std::cin >> x) break