PDA

View Full Version : space


Xiang
05-07-2003, 10:53 AM
Dear sir,

Refers to the below coding. If user leave the 'bm_mark' field blank, my error message would't appears why???

do {
gotoxy(25,17); fflush(stdin); scanf("%f", &bm_mark);
if (isspace(bm_mark))
{
gotoxy(10,25); textcolor(LIGHTRED);
cprintf("Do not leave the 'BM Mark' field blank!"); //error message
getch();
/* clear end of line at col 10, row 15 */
gotoxy(10,25); clreol();
}
}while (isspace(bm_mark));


Thanks,

xiang

djdante97
05-07-2003, 06:44 PM
because you scan in a float, and a float can't be a character (ie a space).