Jump to content
  • Advertisement
Sign in to follow this  
sfx81

simple Header question

This topic is 3630 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I usually include all the header files in my project into a single header file and use it in all the places. something like this MainHeader.H --------------------- #ifndef HEADERS_H #define HEADERS_H #include <string.h> #include "MyFileHeader0.h" #include "MyFileHeader1.h" #include "MyFileHeaderN.h" #endif //HEADERS_H ------------------- then I use this MainHeader.h in all the *.cpp files like in "MyFileHeader0.cpp" etc. What I am asking is what kind of cons and pros this technique has and what is it called (if this thing has any name ?). Any help will be appreciated. Regards Kazz

Share this post


Link to post
Share on other sites
Advertisement
With support for precompiled headers this will generally speed up compilation.
Without support for precompiled headers this will generally slow down compilation.

gcc and msvcpp have support for it, probably edg based compilers, too. Maybe more.

edit: Consult your compiler's handbook for that topic, as exact usage differs from compiler to compiler.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!