If I write 1 letter, I get the error message once.
If I write 3 letters, I get the error message three times......
How can I fix this :S?
#include <iostream>
#include <stdio.h>
#include <math.h>
#include <cmath>
#include <stdlib.h>
using namespace std;
int main()
{
//vars
char user_numberr;
//int user_number;
cout
<<"Welcome! \nPlease pick a number between 1 and 5."
<<endl;
cin>>user_numberr;
while(!isdigit(user_numberr))
{
cout
<<"I said a number bewtween 1 and 5!"
<<endl
<<"Try again :";
cin>>user_numberr;
}
int user_number = atoi(&user_numberr);
cout
<<user_number
<<"WEEEEEEEEEEEEEEEEEE PIIIIIIIII CIIIII LIIII ;OOO"
<<endl;
system("pause");
return 1;
}