0

I came across this line "The include directive instructs the preprocessor to paste the text of the given file into the current file".I want to know if the above statement is true or not.If it is,then why can't we see the text that has been pasted? source : http://www.cprogramming.com/reference/preprocessor/include.html

  • 1
    You can see it if you use `-E` flag with gcc at compile time. It will generate the pasted output -- the full content that gets passed to the compilation phase. – R Sahu Feb 13 '15 at 05:58

1 Answers1

1

You probably can... most compilers have a command line argument to output the code after preprocessing, i.e. expanding of #includes, macros, selection using #if/#ifdef etc..

For GCC and clang it's -E.

For Visual C++ it's /E.

Tony Delroy
  • 102,968
  • 15
  • 177
  • 252