Code help (Double pointers of objects and dynamically allocating it)

Glavinsolo

Platinum Member
Sep 2, 2004
2,946
0
0


So I have an object Reck

I have an assignment in my header
Reck** recks;


And I want to dynamically allocate that now that I know the value

value_of_recks=12;

so how do I make my recks= [12]?
---------------------------------------------------------

Basically I want to end up with

Reck* recks[12];

I am googling as we speek!

Thanks guys
 

dighn

Lifer
Aug 12, 2001
22,820
4
81
recks = new Reck*[12];

btw we have a forum for this. though granted, if you posted there you mightnot get an anwer this quickly