Use gcc -E (or similar for other preprocessor)
gcc -E prepro.cxx
# 1 "prepro.cxx"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "prepro.cxx"
# 17 "prepro.cxx"
class RTCount13:RTCountBase {
public:
virtual int initialize(const void *);
virtual int run(const void *);
virtual void reset();
virtual int output(const char*);
virtual void terminate();
private:
static const char m_szValue="13";
};;
You try to assign "13" to a char.
By the way you could also use a template instead of a macro to do the exact same thing your macro did (namely to declare but not define the methods). Here's a complete (trimmed down) example with separate method definitions.
#include <iostream>
class RTCountBase {};
template <class base_class_name, int v>
class RTCount: base_class_name {
public:
virtual int output();
virtual void terminate();
private:
static const int m_szValue=v;
};
template <class base_class_name, int v>
int RTCount<base_class_name,v>::output(){ return m_szValue; }
template <class base_class_name, int v>
void RTCount<base_class_name,v>::terminate(){ std::cout <<" term "<<std::endl; }
typedef RTCount<RTCountBase,13> RTCount13; // typedef instead of macro
typedef RTCount<RTCountBase,14> RTCount14;
int main(){
RTCount13 myc13;
RTCount14 myc14;
std::cout << "my13: "<<myc13.output()<<std::endl;
std::cout << "my14: "<<myc14.output()<<std::endl;
return 0;
}