Satish wrote:
> > //now i want to allocate the memory for the class whose name is stored
> > pPtr = new "some way to call the constructor whose name is stored in
>
> Check out here
> http://home.earthlink.net/~huston2/d...MethodDemosCpp
Yes, factory can help you, if number of classes is not very big.
Factory in the case will use
links between "signs" of class and metods of class creation, for
example:
template<class Trequested>
class creator
{
const char* name; //any uniq string
int number; //any uniq number
Trequested* create(){ new Trequested; }
};