C++ String to class name -


this question has answer here:

i read file, , based on each line create object of class same name first word of line, require me make "if statement" check each word , create object. there way convert string class name, can that:

string classname = "someclass"; classname obj; 

no, can't...
declaration/definitions need known @ compile-time. can achieve runtime-polymorphism building class-hierarchy (and/or interfaces), though.


Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -