The information in this article applies to:
SYMPTOMSIn an application compiled with Microsoft C/C++, using the toascii, tolower, or toupper macros with a pointer value produces incorrect results, such as corrupted strings or a GP fault, depending on which compiler you use. CAUSEBecause the tolower and toupper macros evaluate the input argument twice, the compiler performs any pointer arithmetic specified in a macro argument twice. This problem occurs most often with macros that affect an individual character because character pointers are common arguments for these macros. RESOLUTION
The text below presents two methods to address the behavior the
side effects cause.
MORE INFORMATIONSample Code
The sample code above may produce the following output:
Additional query words:
Keywords : kbCRT kbVC100 kbVC150 kbVC151 kbVC200 kbVC210 kbVC400 kbVC410 kbVC420 kbVC500 kbVC600 |
Last Reviewed: July 26, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |