|
-
October 16th, 1999, 08:04 PM
#1
CArray
Hi All
Is it possible to create a 2D-Array with CArray if so how??.
Thanks in advance
Mustafa
______________________________
To err is human, it's the computer that causes blunders !!!
DO: Dazzle me with your intelligence
DON'T : Confuse me with your bullshit
-
October 16th, 1999, 11:19 PM
#2
Re: CArray
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
Chen Weiye
-----------------------------------------------------------------------------
When pursuing your dream, don't forget to enjoy your life
-----------------------------------------------------------------------------
-
October 17th, 1999, 04:20 PM
#3
Re: CArray
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|