fork download
  1. #include <vector>
  2.  
  3. struct Square {
  4. public:
  5. Square(bool) {}
  6. };
  7.  
  8. int main() {
  9. std::vector<std::vector<Square>> squares;
  10.  
  11. squares.resize(10);
  12. for (int row = 0; row < 10; ++row) {
  13. for (int col = 0; col < 10; ++col) {
  14. squares[row].emplace_back(false);
  15. }
  16. }
  17. }
Success #stdin #stdout 0s 3452KB
stdin
Standard input is empty
stdout
Standard output is empty