c++ - How do I see what a file looks like after preprocessing? -


how can check results of preprocessing? example, have following code:

#define concatenate(x, y) x ## y #define string_1 first #define string_2 second #define string_3 concatenate(string_1, string_2) 

is there way make sure string_3 expanded firstsecond later in program?

each compiler should provide switch keep preprocessed code

  • gcc: -e
  • ms visual studio: keep preprocessed files in settings or /p switch

for other compilers bet you'll find suitable switch in documentation


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -