new'ing an array of classes.
Posted on 1998-05-11
Is this even possible? Eg:
float *fp = new float; // allocate an array of type float
NewClass *classArray = new NewClass; // Is this possible?
Compiling and running this in the debugger MS VC++ 5 shows that the last line news a single object of class NewClass and the trailing  seems to have been dispensed with. Trying to access a member function of classArray produces a compile error.
F:\Espro For Windows\Source\matworksht.cpp(152) : error C2819: type 'ClassArray' does not have an overloaded member 'operator ->'
F:\Espro For Windows\Source\matworksht.cpp(152) : error C2227: left of '->MemberFunction' must point to class/struct/union