by Hosed » Oct 19, 2002 @ 12:02am
Actually the whole point of #ifndefs and #pragma once is to alleviate those problems. You wouldn't get that error from your sample code.
The best way around this is just to include the header in another header (like stdafx) and then in that header be sure to wrap the includes with #ifndef or #pragma once. Then all the sub modules that need that header should just include the main header it's in.
I do this a lot in my projects by setting up large component headers that contain all the various classes and library headers for that major component that might be needed by the individual pieces.
L. L. Goodwin<BR>Purveyor of Code<BR><A href="http://www.planettribes.com/hosed/">Hosed's House of Code</A>