class - c++: Dynamically choose which subclass to create -


I'm new to c ++ and I have any questions.

We say that we have a base class base and have two derivative classes, Derived1 and Derived2 eg Derived1 have a constructor in which an integer and a conclusion that the cooler takes a boolean.

Is it possible to determine whether on the runway (or in time compilation), which of the two subclasses is the base class?

Something like this: base b = ??? (Value), where the value is of integer or boolean.

Thanks in advance!

You probably want to


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -