Click here to Skip to main content
15,920,438 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to implement array which is in class shape:
char shapeO[4][4]={{0, 0, 0, 0},
{0, 1, 1, 0},
{0, 1, 1, 0},
{0, 0, 0, 0}};
I want to take this array in other class named block array in this class:
char block[4][4][4];

What I have tried:

I want to implement array which is in class shape:
char shapeO[4][4]={{0, 0, 0, 0},
    {0, 1, 1, 0},
    {0, 1, 1, 0},
    {0, 0, 0, 0}};
I want to take this array in other class named block array in this class:
char block[4][4][4];
Posted
Updated 10-Dec-17 6:25am
Comments
Richard MacCutchan 10-Dec-17 7:39am    
What do you want to put in the extra cells?

1 solution

Then copy shapeO items into, for instance block[0] ones.
In C++ code, consider using better containers, like std::vectors or std::arrays.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900