Clarify what method I should be using.

(it's 1:15am est, after a long day...)

I want to create random amounts of objects at a time, store them in an array and be able to search through the array for certain object properties.

I think I should be using a linked list or vectors...what would be better? I realize some type of pointer will be my way out of this problem.

Also, when I add a random amount of objects would it be more like:
1
2
3
4
5
6
7
8
9
void createobject()
{
class object;
push_into_array;
};

main()...
for(int x=0;x<random_int;x++)createobject();
...


or

 
class object_array[random_int];


I know right now I'm just looking for an easy way out of reading about linked lists, but if there's no replies after I wake up. Then, that's surely what I'll do.
Last edited on
std::vector > arrays. Also, your array syntax is wrong, but that's beside the point.
what do you mean? have a random number generator inside of the object array class?
as in

class object_array[function(get_random_number)];


hey whats a vector?
hey whats a vector?

Basically more manageable arrays: http://www.cplusplus.com/reference/stl/vector/
Topic archived. No new replies allowed.