How can i create a 2D array.
For which i could change its size
change its form
like creating an array of one size and later in the program i could change this variable
??
How can i create a 2D array.
For which i could change its size
change its form
like creating an array of one size and later in the program i could change this variable
??
Last edited by transgalactic2; 12-17-2008 at 04:20 PM.
Yes, that can be done. You need to use either an array of pointers (if the leftmost dimension is known or a reasonable maximum can be estimated) or a pointer to pointer (fully flexible solution).
--
Mats
Compilers can produce warnings - make the compiler programmers happy: Use them!
Please don't PM me for help - and no, I don't do help over instant messengers.
As matsp said, your best off using a pointer in which you allocate an amount of memory, and then are able to allocate another amount of memory, and then be able to free any unused memory.