Horje
integer type validation c++ Code Example
integer type validation c++
cout << endl << "Introduce an integer: ";
p = scanf("%d", &x);       //Scanf returns a false when the value doesn't match the correct format.
getchar();

while (p == false)
{   cout << endl << "You didn't introduce an integger. Try again.";

 	cout << endl << "Introduce an integer: ";

    p = scanf("%d", &x);
  	getchar();
}




Cpp

Related
c++ std::copy to cout Code Example c++ std::copy to cout Code Example
g++ optimization flags Code Example g++ optimization flags Code Example
crypto npm random bytes Code Example crypto npm random bytes Code Example
Poland Code Example Poland Code Example
How to find the individual letters of a string c++ Code Example How to find the individual letters of a string c++ Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8