c++ operator[] operator,

I want to implement a matrix operator[], like Python
1
2
3
Matrix<4,4> m;
m[0,0] = 0;
m[0,1] = 0;


How to implement?
You can't - it's a language limitation.

Use the parentheses instead (m(0, 1)), or use two pairs of brackets: m[0][1];
Last edited on
Topic archived. No new replies allowed.