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

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -