I would like to make an error appear when a user hits enter instead of entering data first (ie. leaving the line blank). I have tried
line[i] == '' generates an error
line[i] == ' ' only works if they hit the spacebar first
line[i] == '\0' or EOF or '\r' or '\f' none of which work...
my first instinct is to use '\n' but obviously that wouldnt work.
So if there isnt an escape sequence for this, what would be the best way? Count the number of characters and if that number > 0 then error?



LinkBack URL
About LinkBacks



