Possible Duplicate:
C/C++ source file after preprocessing
The other day, I was assigned a task to fix a bug in a large C/C++ project developed under VC++ 8. The problem is that this code is really full of nested macros. What is the best way to understand this code? Any suggestion is appreciated.
By using the compiler line option
/Ethe build will output all of the preprocessor output to standard out. This file will include all the macros expanded along with all of the includes expanded inline. You’ll need to figure out the best way to add this flag depending on how you build your project. With the output you can better see what the macro’s are expanding too, but it still can be tricky to trace the output back to which macro expanded it. However, you should be able to figure that out. Reference for the command line options for VS8.0 compiler.As pointed out in the comments, this is a duplicate and here is the better answer: https://stackoverflow.com/a/277362/192896