saurabh.
@gmail.com wrote:
> Hello Friends,
> The problem is that i get the names of the object type dynamically at
> the run time as a string name to a function. Now this function is
> suppose to create an object of the type name specified as the string
> to the function. (Suppose we already have a class declared by that
> name specified)
> For e.g.
> class ABC
> {
> };
> int main() {
> string k = "ABC" ;
> // k * a = new k ; how to implement this??
> return 0;
> }
Use a std::map of std::string and a helper object that creates the