Array of Class C++ question

Ynog

Golden Member
Oct 9, 2002
1,782
1
0
Its been a while since I have used C++ so I ask this question

I need to create a dynamic array that contains pointers to classes.

What is the best way to do this?
 

Armitage

Banned
Feb 23, 2001
8,086
0
0
Originally posted by: EagleKeeper
use the vector<class*,class*> name;


yep ... use the vector container from STL

But shouldn't it just be

vector<class*> hndl;

Not sure what the second class* is for in yours?