// Very simple code to understand how tlcc works #include #include using namespace std; #define _TLMP_foo struct _F_foo{ #define _F_foo_func1(x) void x func1(const char *msg) virtual _F_foo_func1( )=0; #define _F_foo_func2(x) void x func2(const char *msg) virtual _F_foo_func2( )=0; }; void foo (_F_foo &c, const char *msg) { c.func1(msg); c.func2(msg); } int main() { ("foo1"); printf ("This is func1 msg=%s\n",msg); string tmp = string(msg) + " -> func1"; (tmp.c_str()); printf ("This is func1 -> func1 msg=%s\n",msg); printf ("This is func1 -> func2 msg=%s\n",msg); printf ("This is func2 msg=%s\n",msg); string tmp = string(msg) + " -> func2"; (tmp.c_str()); printf ("This is func2 -> func1 msg=%s\n",msg); printf ("This is func2 -> func2 msg=%s\n",msg); return 0; }