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++)Code:int grpNo; do { cout << "\n\nEnter the " << statement << " number of existing groups : "; cin >> grpNo; statement="valid!..."; cin.ignore(); } while( !isdigit(grpNo) );
kinda stuck ?



LinkBack URL
About LinkBacks




shouldn't it be accepting for integers only?