Is there a way to create multiple objects by simply renaming the same objects in an array?
Is there a way to create multiple objects by simply renaming the same objects in an array?
new and delete?
Automatically copy and create objects that you create.
- CObject Object2 (ObjectOrg);
- CObject Object3 (ObjectOrg);
Because I have to make this.
No, objects in an array don't have individual names in the first place: they are referenced with the array name in combination with an index.
On the other hand, if you want to copy objects of class type, that would involve the copy constructor or copy assignment operator.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)