Skip to content

Instantly share code, notes, and snippets.

@derofim
Created August 14, 2015 07:50
Show Gist options
  • Select an option

  • Save derofim/5ec85b008301a8e79498 to your computer and use it in GitHub Desktop.

Select an option

Save derofim/5ec85b008301a8e79498 to your computer and use it in GitHub Desktop.
#include <iostream>
const int n = 2, m = 3;
int main()
{
int arr[n][m] = { { 3, 5, 4 }, { 8, 6, 9 } };
for ( auto& row : arr )
{
for ( auto col : row )
{
std::cout << col << " "; // 3 5 4 8 6 9
}
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment