Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Now, whats a precompiled header?

header precompiled
0
Posted

Now, whats a precompiled header?

0

After the headers included by stdafx.cpp are processed, the preprocessor saves a snapshot of its internal state, which includes all the function prototypes and #defines in the Windows headers, along with anything else you added to stdafx.h. This snapshot is saved in a .PCH file. Since processing all those headers takes a long time, when the compiler compiles the other .CPP files, it reloads the preprocessor state from the .PCH file instead of processing all the headers again. The preprocessor looks for an #include “stdafx.h” line or a #pragma hdrstop directive to tell when it should read the .PCH file. If neither of those lines is present, you’ll get error C1010.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123