Sunday, July 26, 2009

C++ resizing 2d array?

Can someone please explain how to resize 2d arrays? I'm trying to convert from 1d array to 2d array but the size of the 2d array varies--like TwoD[3][3], TwoD[4][4], TwoD[5][5], etc. I need a way to resize the 2d arrays so that it can accommodate any number.





Please help guys! Atleast tell me if I can do it any other way than this.





Thank you!

C++ resizing 2d array?
dynamically allocate it with new.

gladiolus

No comments:

Post a Comment