#: 4652 S3/Languages
26-Jun-90 09:29:31
Sb: #4562-Help 'c' problem again
Fm: Pete Lyall 76703,4230
To: SCOTT HOWELL 70270,641 (X)
Scott -
I'm sure you've had multiple responses at this point, but I see a couple of
things:
a) There's a semicolon after your test condition, which in effect
causes a 'null' statement (i.e. while(c == 'd'), do nothing -
including not getting any other characters, so the results
of the test never change.
b) What is c initially? If it's a typical automatic variable,
it could contain anything - no promises here unless it's
a static variable. You could either shift the position
of the getchar(), and alter the logic, or you could stuff
a NULL or something into c so you know your starting point.
Pete
|