K
K
kirsan_vlz2011-09-19 23:36:08
OOP
kirsan_vlz, 2011-09-19 23:36:08

Create an object by class name. C++

There is a variable with a string containing the name of the class. Is it possible to create an object of the class specified in the string using this string variable?
The search returns only options for QT and .NET.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
gavenkoa, 2011-09-20
@gavenkoa

There is no reflection in the C++ language - i.e. the ability to get language objects by name at runtime (not to be confused with the time of compilation).
That's why QT uses /bin/moc...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question