I wrote a class B as a subclass of A to extend it. And now I want to change all the
 a = A::create(); 
to
 a = (A*)B::create(); 
And everything works fine. But I don't want to manually change the code wherever an object of A is created. So I tried the following #define directive
#define A::create (A*)B::create
but it doesn't work at all. I don't know what the problem is. Any help? Can I use #define directive with :: ? Why it doesn't work?
 
     
     
    