GfG QA is closing soon... Please refer PRACTICE or GfG now on wards !!

How to view Compiler inserted code in C++

HI, How to view compiler inserted code in C++.

compiler inserts constuctors and copy constructors.

how to see  compiler inserted code.

Regards

Ram

asked Nov 22, 2015 by ramswish

1 Answer

Answers are compiler specific, and you didn't mention a compiler. If you use gcc, you can get the output of the preprocessing through -E parameter. g++ -E shows preprocessor output for gcc, which does the header file part. So you can just run:

gcc -E file_name.c
answered Nov 22, 2015 by Mr.Lazy
...