char f;
cin >> f;
Oh Wait You Want Integer so It Would Be int f;
cin >> f;
Yea but now how do I now take it so it can be manipulated as a number and how do I verify there are no letters in it?
Edit: I wrote that code myself I do know what I am doing to this level I am asking how do I get input from the user and extract a number from it but also making sure that nothing but numbers were typed,
I have done pointers and memory all that jazz im not great with it but this I can handle. Yes I consider myself a noob and will continue to until I know c++ very well and at least a bit of the windows api + direct x
Question:
Would I check for ascii? Or is it unicode? Is it different for linux or for macs?
just make a for cicle and check if the variable of the loop is equal to your imput, like:
int f;
cin>>f;
for(int j=0; j<10; j++)
if(f==j)
//it's a number