what is the code for making an array of objects?
i would greatly appreiciate any replies thank you.
That should be fairly simple. e.g. if you have a class MyClass and you want to make say 5 object array , declare some thing like
MyClass objs ;
If you want a dynamic array use pointers --
MyClass *obj ;
obj = new MyClass[num] ;
Mail me if you have any further doubts .
Isn't it more instructive to discuss things on this message board?
when you want arrays, 99% of the time you actually want a std::vector
Yes, but given the nearly unlimited uses for arrays/vectors, 1% of the time is still a lot...