Whenever you #include a file, the compiler has to parse it. If you #include dozens of files you don't need, you'll start seeing you compile time increasing.
Plus if you have a "everything.h" file that every file includes -- then every time you change "everything.h"... the entire program needs to be recompiled. For large projects this is huge. I've had several projects that took a good 2 or 3 minutes to fully compile.
I've had several projects that took a good 2 or 3 minutes to fully compile.
Wow, I tend to rely on trial and error, attempting to compile many times before my program works properly. I'll have to change my approach when I get to bigger stuff.
Why would you need to change "everything.h" though?
If you find out you need to use another header, for example.
Wow, I tend to rely on trial and error, attempting to compile many times before my program works properly.
Just recompiling a single source file doesn't take that long. I'm talking about recompiling everything. In a project that's 50+ source files, recompiling all of them takes time.
The headers you mentioned above do not have code for everything you could possibly want.
Later on in your program's development, you might decide you need to use std::string. Since using std::string requires you #include <string>, you have 2 options:
1) put #include <string> in the necessary cpp files
or
2) put #include <string> in "everything.h" and recompile your entire program.