Thanks for your help. With strings it do be easy yes. Though not allowed to use it.
Can be done by this simple method:
cout << "Please enter a number: ";
cin >> n;
while (cin.peek() == ' ')
cin.ignore(1,' ');
if(cin.fail() || cin.peek() != '\n')
cout << "Not a number." << endl;
else
cout << "A number." << endl;