File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,16 +22,6 @@ The Visual C++ stringizing operator does not behave correctly when it is used wi
2222
2323The following example shows a macro definition that includes the stringizing operator and a main function that invokes the macro:
2424
25- Such invocations would be expanded during preprocessing, producing the following code:
26-
27- ``` cpp
28- int main () {
29- printf_s ( "In quotes in the printf function call\n" "\n" );
30- printf_s ( "\" In quotes when printed to the screen\" \n" "\n" );
31- printf_s ( "\" This: \\\" prints an escaped double quote\" " "\n" );
32- }
33- ```
34-
3525``` cpp
3626// stringizer.cpp
3727#include < stdio.h>
@@ -43,6 +33,16 @@ int main() {
4333}
4434```
4535
36+ Such invocations would be expanded during preprocessing, producing the following code:
37+
38+ ```cpp
39+ int main() {
40+ printf_s( "In quotes in the printf function call\n" "\n" );
41+ printf_s( "\"In quotes when printed to the screen\"\n" "\n" );
42+ printf_s( "\"This: \\\" prints an escaped double quote\"" "\n" );
43+ }
44+ ```
45+
4646```Output
4747In quotes in the printf function call
4848" In quotes when printed to the screen"
@@ -64,4 +64,4 @@ FB1(F B)
6464
6565## See also
6666
67- [Preprocessor Operators](../preprocessor/preprocessor-operators.md)
67+ [Preprocessor Operators](../preprocessor/preprocessor-operators.md)
You can’t perform that action at this time.
0 commit comments