I'd like to generate a number of objects (in C++) based on the amount/number the user enters.
Now I've somewhere heard that it has to be done using pointer tricks, creating a pointer to an array of the Object type required, and then dynamically increasing the size of array ( at runtime ).
Isn't there a workaround of directly using names like Object1, Object2..... ObjectX instead of having Classname *Object[] and then using the array index to get the object ?
In either case, it'd be great if someone could clarify on the issue.
Thanks !