-
May 16th, 2010, 01:28 PM
#1
How to assign array to another array?
I am trying to make following assignment:
int aTablica3D[2][2][2] = { { { 1, 2 }, { 2, 3 } },
{ { 3, 4 }, { 4, 5 } } };
int aTablica2D[2][2];
aTablica2D = aTablica3D[1];
I have found a tutorial which contained this example. But it seem to not work with visual C++
Anyone has any idea how to do it without a loop?
I am using VC++2008 Express.
-
May 16th, 2010, 01:31 PM
#2
Re: How to assign array to another array?
Here is error I receive when trying to compile:
Error 4 error C2106: '=' : left operand must be l-value d:\programy\vc++\projects\tetris\tetris\block.cpp 17
-
May 16th, 2010, 02:14 PM
#3
Re: How to assign array to another array?
Arrays don't have a '=' operator. On other words, arrays don't know what to do with the '=' sign.
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
|