Hi,
I have a problem in accessing derived class member from base class pointer.....
I have two classes as follow:
I want to access set(char*) function of class B with the help of A class pointer as follow:Code:class A { }; class B : public A { public: void set(char *); };
But this is giving error that A class don't have any member set(char *)................Code:B *b = new B; A *a = dynamic_cast<B *>(b); a->set(char *);
Can anybody tell where I am wrong............
Thanks