开发者

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;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜