p3im4n wrote:
but I cant use if statement in header!
Why not? A header is just a text file that gets included into, and compiled as part of, some source code. It is quite common to do something like:
// in header file
#if defined(foo)
// some code to be generated
#endif
// in cpp file
#define foo
#include