Help. If func with char.

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,
what is idnum declared as?
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...
Topic archived. No new replies allowed.