Tuesday, April 22, 2008

Source code organisation of templates

in the H file:
#ifndef __MY_TEMPLATE_H
#define __MY_TEMPLATE_H


... #include "mytemplate.cpp"

#endif __MY_TEMPLATE_H

and in the CPP file

#ifndef __MY_TEMPLATE_CPP
#define __MY_TEMPLATE_CPP
#include "mytemplate.h"
...
#endif __MY_TEMPLATE_CPP

No comments: