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].开发者_StackOverflow How can i make it?
struct FieldMatrix { Field fields[8][8]; };
// not familiar with Stack, but here's the standard library stack type
std::stack<FieldMatrix> foo;
精彩评论