simple Header question
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
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement