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

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -