homer512 icon

Dominic's question

homer512 | PRO | 05/21/17 08:52:53 AM UTC | 0 ⭐ | 564 👁️ | Never ⏰ | []
C++ |

460 B

|

None

|

0 👍

/

0 👎

#include <array>
#include <iostream>
 
 
int main()
{
  std::array<std::array < char, 3>, 3> table = { {
    { '-','-','-', },
    { '-','-','-', },
    { '-','-','-', },
    } };
 
  for(int firstCounter = 0; firstCounter < table.size(); firstCounter++) {
    for(int secondCounter = 0; secondCounter < table[firstCounter].size();
        secondCounter++) {
      std::cout << table[firstCounter][secondCounter];
    }
    std::cout << std::endl;
  }
}

Comments