Click here to Skip to main content
15,889,542 members
Articles / Programming Languages / C

Improve compile times with forward declarations

Rate me:
Please Sign up or sign in to vote.
4.67/5 (5 votes)
2 Mar 2010CPOL2 min read 12.6K   2  
Header files often #include lots of other headers because other classes are being referenced. These chained includes force the compiler to repeatedly load and precompile long lists of headers over and over again. Thanks to #pragma directives or #ifdef guards this is a rather cheap operation,...

Views

Daily Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Switzerland Switzerland
Graduated at TU Darmstadt in Math & CS, with a heavy focus on CAD/CAM

Programming and designing applications in C++ in the areas AI, real-time programming, client-server applications and CAD/CAM since 1985.

Personal interests: AI, computer graphics, games, reading

Comments and Discussions