"Rasmus" <(E-Mail Removed)> wrote in message news:<bg61iq$2s5b$(E-Mail Removed)>...
> Hi, here a quick question:
> I have class A,B,C where B and C is extended from A.
> I would like to construct A objects like:
> A *a3 = new A(a1, a2);
> and a3 should be an object of type B or C.
> Is this possible?
> | true: How?
> | false: Can you give me a nice solution?
> Thanks for your time
A* a3 = new B(a1, a2);
A* a4 = new C(a1, a2);
provided B and C have such constructors. If not, use the apropriate
constructors for B and C.