I followed Ancient Dragon's advice and used vectors to store roughly 1000 objects in a program I have written. Unfortunately, the vector library is not one I am familiar with. I read through the information at http://www.cppreference.com/cppvector/index.html. It seems getting a reference to each element of the vector is the only way to access them... is this correct? Or could I do something as follows:

vector<Thing> things;
//put objects in the vector
things[2].doStuff;

If this is not possible how would I go about accessing the data? Thank you :)

Why dont you just compile and test it?

I'm getting sleep :) but thanks! I'm glad to have that working

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.