C++ multidimensional array operator

后端 未结 7 1315
栀梦
栀梦 2021-01-05 16:22

it is possible to overload somehow operator for multidimensional array?

Something like:

class A {
  ...
  int& operator[][] (const int x, const i         


        
相关标签:
7条回答
  • 2021-01-05 16:58

    It is a single operator being used twice to dereference. You can dereference [] operator and perform the functionality and usage by using it as [][] by changing the return type.

    0 讨论(0)
提交回复
热议问题