Hi rexall
if the target var is say type int, you could try checking the stream state, ie for an int an input of type char will flag the fail bit of the stream flag indicating an error this is a technique i use for checking user input (when you must us stream based input as opposed to getch() or similar)
you can work this into a loop
in >> a.aValue.minutes; // get user input
if (!in.fail() && in.peek() == '\n'){
if(a.CheckLimits(a.aValue.minutes, 0, 60, 2)){
gotoxy(1,10); // locate cursor for this data entry
clreol(); // clear the current display line
cout << prompt_enter << prompt_decl_mn << minminutes
<< prompt_thingy << prompt_to << maxminutes
<< prompt_thingy << a.declination.minutes;
break; // lets get out of here and get the next
item
}
} // end if not in.fail()
CheckLimits is a member function >=0 and <60 and 2 digits
HTH
Robert
Robert Dwyer
rdwyer@orion-online.com.au