use vector
#include <vector>
...
int main()
{
vector<Thing> things;
Thing oneThing;
// add OneThing to the vector
vector.push_back(theThing);
}
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
and you need a default constructor of the class too, since you have declared your own ctor the compiler will not generate it for you...
Agni
Practically a Master Poster
655 posts since Dec 2007
Reputation Points: 431
Solved Threads: 116