0xAX
0xAX

Reputation: 21837

Create stack where the elements are arrays

In my Qt project i have enum:

enum Field {EMPTY=0, WHITE=1, BLACK=2};

And array of this enum:

Field field[8][8];

Now i need create Stack of this array. Ever element of stack must be field[8][8]. How can i make it?

Upvotes: 0

Views: 107

Answers (1)

Mud
Mud

Reputation: 29000

struct FieldMatrix { Field fields[8][8]; };

// not familiar with Stack, but here's the standard library stack type
std::stack<FieldMatrix> foo;

Upvotes: 7

Related Questions