// Very simple code to understand how tlcc works #include #define _TLMP_foo static void print (const char *s) { printf ("::print s=%s\n",s); } struct _F_foo{ void print(const char *s){ printf ("foo::print s=%s\n",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) { c.func1(); c.func2(); } #define _TLMP_bar struct _F_bar{ #define _F_bar_func1(x) void x func1() virtual _F_bar_func1( )=0; #define _F_bar_func2(x) void x func2() virtual _F_bar_func2( )=0; }; void bar (_F_bar &c) { c.func1(); c.func2(); } int main() { (); printf ("This is func1\n"); print("func1"); printf ("This is func2\n"); (); printf ("func2 -> func1\n"); glocal.foo.print("func2 -> func1"); ::print ("func2 -> func2"); return 0; }