How do I create a subscript operator for a Matrix class?, C++ FAQ

How do I create a subscript operator for a Matrix class?, C++ FAQ

瀏覽:1036
日期:2025-06-20
Use operator() rather than operator[]. When you have multiple subscripts, the cleanest way to do it is with operator() rather than with operator[]. The reason is that operator[] always takes exactly one parameter, but operator() can take any number of par...看更多