|
|
|||
File indexing completed on 2026-04-09 07:49:18
0001 // name=SMacroStringify ; gcc $name.cc -std=c++11 -lstdc++ -o /tmp/$name && /tmp/$name 0002 0003 #include <iostream> 0004 0005 #define foo 4 0006 #define bar hello 0007 0008 0009 // https://gcc.gnu.org/onlinedocs/gcc-4.8.5/cpp/Stringification.html 0010 #define xstr(s) str(s) 0011 #define str(s) #s 0012 0013 int main(int argc, char** argv) 0014 { 0015 std::cout << "foo:" << xstr(foo) << std::endl ; 0016 std::cout << "bar:" << xstr(bar) << std::endl ; 0017 return 0 ; 0018 } 0019
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|