how do i ensure a correct integer input
this may seem a lower grade question, but there maybe a trick
If i enter non integer values, the program throws a DEBUG error because is expecting an integer, so this happens even before i validate .. I changed int grpNo to char grpNo .. but the problem is i'm gonna use grpNo in a for loop as a limiter i.e. for(i=0; i<grpNo;i++)
cout << "\n\nEnter the " << statement << " number of existing groups : ";
cin >> grpNo;
while( !isdigit(grpNo) );
kinda stuck ?