How can you ynamically allocate an array of an abstract type?
eg.
Class Abstract is abstract(has a = 0 function) and has 2 non-asbtract child classes(which I want to use to fill the array).Code:int i; Abstract* a;
cout << "How many ? ";
cin >> i;
a = new (nothrow) Abstract[i];
However if I hardcode the array it works
eg.
Code:Abstract* a[] = {
new ConcreteOne(),
new ConcreteTwo(),
new ConcreteOne()
};