Hi All
Is it possible to create a 2D-Array with CArray if so how??.
Thanks in advance
Mustafa
Printable View
Hi All
Is it possible to create a 2D-Array with CArray if so how??.
Thanks in advance
Mustafa
I think this may look a bit uncommon, but....
(Assume 2D array of integers with 2 rows)
CArray <int, int> oa2DArray[2];
Hope this helps
From Weiye
Try the following:
#include <afxtempl.h>
typedef CArray<int, int&> Inner;
typedef CArray< Inner, Inner& > Int2DArray;
// OR the following could have been used
// typedef CArray< CArray<int, int&>, CArray<int, int&>& > Int2DArray;
Int2DArray myArray;
...
All I did was create a CArray of CArrays. I used typedefs to simplify things.
Regards,
Paul McKenzie