What is the point of "stdafx.h"?
Isn't that an allergy medicine?
It's included in every new Visual Studio C++ project
ahh it seems to be a "pre-compiled header"
Yes
Theoretically it should save time since the headers don't have to be re-parsed.
right
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.
Join our real-time social learning platform and learn together with your friends!