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