Ask your own question, for FREE!
Computer Science 12 Online
OpenStudy (anonymous):

What is the point of "stdafx.h"?

OpenStudy (jagatuba):

Isn't that an allergy medicine?

OpenStudy (anonymous):

It's included in every new Visual Studio C++ project

OpenStudy (anonymous):

ahh it seems to be a "pre-compiled header"

OpenStudy (jagatuba):

Yes

OpenStudy (jagatuba):

Theoretically it should save time since the headers don't have to be re-parsed.

OpenStudy (anonymous):

right

OpenStudy (anonymous):

It used to be a header file for "Application Framework Extensions", a set of functionality that was later extended into MFC. MFC was then deprecated and abandoned, but the header file lived on as a precompiled header. It's commonly used to just include everything your project needs and precompile it, but that's a double edged sword. On one hand, you can group a bunch of includes in a single header file, on the other, that's simply bad practice because it counteracts modularization and can actually significantly increase compile times when you modify header files. Technically you should avoid using the #include directive in header files - because it means every file that includes your header, will also include everything your header includes, and so on.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!