I made a structure and I delcared it as an array so now I need to go through a loop and add one more level to the array every time. The real problem is that this isn't VB so I can't redim preserve lol. But besides that, how could I code it in C++? I could have sworn it went like:
Code:
Mystruct struct[1]; //to declare it
//...inside the loop:
Mystruct *struct = new Mystruct[2];
but that gives me an error saying:
error C2372: 'struct' : redefinition; different types of indirection

That should just go to the memory location of the array and allocate more for it but nooo. I looked up the error in MSDN and it makes sense why it exists but it doesn't make sense why it's happening to me now with that code. So what's wrong with it?