Std :: pair或创建一个struct

时间:2016-03-01 10:50:52

标签: c++ struct std-pair

我们讨论了为Snake游戏列和行使用std::pair或一些自己的结构。 我们需要创建类似的东西:

struct { int row; int col;} ... cell.row, cell.col;

或使用:

std::pair<int, int> ... cell.first, cell.second;

0 个答案:

没有答案