I've been reading many of the posts here for quite a while, and it seems that much of the source posted unneccesarily includes several include files!

Because of the size of the code that is actually included with the headers (sometimes chained to other headers subsequently), it would be wise to minimize the number of inclusions that you make.

For example:
Do not #include <windows.h> unless absolutely necessary. Unless you require the generation of dialog boxes, etc., in a standard Win32 Console Project, you do NOT require it. Furthermore, including this file tends to dramatically increase compile time (about 10 seconds).

One method is to include a minimal number of headers, and then compile your code, only adding them if you are prompted by the compiler.

A further optimization is to create a 'pre-compiled' header, which is a standard header file separate to your source project file. Just #include all the headers you need into it, and then #include "MyHeader.h" in each source file that it's required. Don't forget the '#pragma once' directive, or #ifndef...#define...#endif directives, though to protect inclusion.

Hopefully this will change the practises of a few programmers out there .....here's to cleaner code!

Regards,
Peter Kimberley