开发者

Create stack where the elements are arrays

开发者 https://www.devze.com 2023-01-24 16:32 出处:网络
In my Qt project i have enum: enum Field {EMPTY=0, WHITE=1, BLACK=2}; And array of this enum: Field field[8][8];

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

精彩评论

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