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

asp.net - Change the driver in the connection string to a data source in VB.Net -

Getting started consuming web services in a Ruby on Rails 3 application -

objective c - iPhone and it's wireless area -