Instantiating a class by name in a string

Q

Qu0ll

Is it possible to instantiate a class from its name stored in a string? In
Java I would use the Class.forName() method. Is there something equivalent
in C++?

--
And loving it,

-Qu0ll (Rare, not extinct)
_________________________________________________
(e-mail address removed)
[Replace the "SixFour" with numbers to email me]
 
B

Brij

Is it possible to instantiate a class from its name stored in a string?  In
Java I would use the Class.forName() method.  Is there something equivalent
in C++?

--
And loving it,

-Qu0ll (Rare, not extinct)
_________________________________________________
(e-mail address removed)
[Replace the "SixFour" with numbers to email me]

Hi there,

You may find the solution at URL


http://stackoverflow.com/questions/...objects-from-a-string-holdig-their-class-name



Regards
Brij B. Bohara
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top