getch() and getche() in MSC 4.0

Markus Ruppel mru at unccvax.UUCP
Fri Oct 21 09:32:15 AEST 1988


>Scott Horne:
> 
> 	c = toupper(getch());
>
Per default, toupper() is implemented as a macro which causes side effects.
You have to '#undef toupper()' to force the compiler to use the function 
version. This also applies to 'tolower()'.

Markus Ruppel
Dept. of Chemistry
UNCC
USA

UUCP: ...mcnc!mru
      ...mcnc!unccvax!mru
BITNET: ACC00MR1 at UNCCVM



More information about the Comp.lang.c mailing list