hi, could someone give me some tips on how can i make the repeat if false has occur.
for example: the program must read in positive integer but if user enter incorrect type data, the computer will ask the user to re-enter number. can someone help me on this? please/
bool ok = false;
while(!(cin >> num))
cout << "Enter integer: ";
if(num < 1)
cout << "Enter positive number!";
ok = true;
Read the FAQ, I'll bet you anything it's in there somewhere. And read this while you're at it.