c++ - Call init() function in .h file -
i able call init() function included .h file in .h file, following:
t1.h:
#ifndef t1_h #define t1_h class t1 { static void init() {...} ... }; #endif t2.h:
#ifndef t2_h #define t2_h #include "t1.h" class t2 { ... }; t1::init(); #endif what correct way of doing this?
Comments
Post a Comment