I knew precompiled header file recently and I have learned benefits of it by reading docs of microsoft.
The question is that it seems only including precompiled header file in source file is the recommended way. I don’t know whether it is mandatory. Based on my understanding of C++ compilation process, in the pre-processing stage, all included header files will be added into source files.
And if precompiled header file should be included only in source file, what should I do if I need to use one class declaration in the included header files? I know there is forward declaration, but if I need a lot of rather than one? In such case, is it better choice not using precompiled header?
Thank you
I want an answer or more details of precompiled header.
penguieathyh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.