The information in this article applies to:
SUMMARYIn Microsoft C for MS-DOS and Windows NT, when you are writing a preprocessor macro that takes an argument that must appear in quotation marks, you can use the # sign to expand the argument. One implementation of this preprocessor directive is the use of printf() in the macro. The following code demonstrates an example: Sample Code
The sample code outputs the following string:
The # sign in front of the fmt variable allows the macro to be expanded
using quotation marks. Note that the preprocessor concatenates consecutive
pairs of double quotation marks so that the following string
is translated into the following:
Additional query words: pound number
Keywords : kbLangC kbVC100 kbVC150 kbVC200 kbVC400 kbVC500 kbVC600 |
Last Reviewed: July 1, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |