I'm writing a program that gets a number from the user and print it, I want to check if the user's input is a number or not.
#include <iostream>
int main(){
int x;
std::cout << "Enter a number: ";
std:;cin >> x;
/*
Here's what I want to do
if (isInteger(x)){
std::cout << "\nYour number is " << x << ;
} else if (isNotInteger()){
std::cout << "\nInvalid value\n\n";
}
*/
return(0);
}