Mar 10, 2013 at 8:51am
How am I supposed to make this:
cout << "Enter your ID number : 2012-";
cin.getline (idnum,49);
if(idnum>10020 || idnum<9999){
cout << "}Please enter a valid ID number.";
return 0;}
To make an output like this (I got 33 errors because of that if func)
Enter your ID number: 2012-10021
Please enter a valid ID number.
And the phrase "Please enter a valid ID number." will be cleared
and only "Enter your ID number:" will remain,
Mar 10, 2013 at 3:05pm
what is idnum declared as?
Mar 10, 2013 at 3:34pm
I suspect that idnum is declared as a string hence the errors.
I advise that you use ncurses so that you can control the screen as you want, i.e. clear the screen etc...