Hi pros,
Recently I have been reworking a c++ project from a commercial software company.
I found they do the following a lot in their code:
include winThis.h, winThat.h, winBlah.h etc. etc. and in the end their code only end up using some simple typedefs in these windows headers, e.g. #define unsigned long ULONG
I think first of all this slows down the compilation, as you include so much stuff that you do not use at all, right?
Secondly, it makes the code a pain in ass to carry over different environments: 1. different OS and hence different windows headers 2. different versions of Visual Studio seem to process headers of the same project in different way too
So, why not just use "unsigned long" yourself instead of using ULONG from a environment-dependent system header?
Recently I have been reworking a c++ project from a commercial software company.
I found they do the following a lot in their code:
include winThis.h, winThat.h, winBlah.h etc. etc. and in the end their code only end up using some simple typedefs in these windows headers, e.g. #define unsigned long ULONG
I think first of all this slows down the compilation, as you include so much stuff that you do not use at all, right?
Secondly, it makes the code a pain in ass to carry over different environments: 1. different OS and hence different windows headers 2. different versions of Visual Studio seem to process headers of the same project in different way too
So, why not just use "unsigned long" yourself instead of using ULONG from a environment-dependent system header?