Hi,
1) I want the user to type in numbers without any spaces
say for eg: user inputs "12 34" .
error should be displayed ........
2) Also if he tried to leave it blank and skip it,then too error should be displayed.
i tried like this
Code:
cin>>num;
while ( num=" ")
{
cout <<"no blanks allowed ";
cout<<"please re-enter"
cin>>num;
}
but unsuccessful.......can any one suggest me the right way of solving the above 2 Qs.
Sorry,but Ir eally new to this programminf stuff,and I appreciate if u all gurus out there ,give me a helping hand...thanks....