Last active
June 23, 2016 16:34
-
-
Save emersonmx/a868f765f8c1c36bc0179e6328d1eae5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * make testearr && ./testearr | |
| */ | |
| #include <iostream> | |
| #include <array> | |
| template <typename T, std::size_t I, std::size_t J> | |
| using Matrix = std::array< std::array<T, J>, I>; | |
| int main() { | |
| Matrix<int, 3, 2> m { | |
| 1, 2, | |
| 3, 4, | |
| 5, 6 | |
| }; | |
| for (int i = 0; i < m.size(); ++i) { | |
| for (int j = 0; j < m[i].size(); ++j) { | |
| std::cout << m[i][j] << " "; | |
| } | |
| std::cout << std::endl; | |
| } | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment