c++ - Is there a way to instantiate objects from a string ...

c++ - Is there a way to instantiate objects from a string ...

瀏覽:1047
日期:2025-07-04
2009年2月24日 - class Base; class DerivedA : public Base; class DerivedB : public Base; /*etc. ... DerivedA(); } else if(msClassName == "DerivedB") { return new DerivedB(); } else if(/*etc. .... I'm sure there are better names for those two though....看更多