0

Is it possible to implement something like a double [], in order to call a method of my object like this: obj[x][y]?

Natjo
  • 1,791
  • 21
  • 61

1 Answers1

4

Yes. You can have the regular class operator[] return a special "proxy object" which has its own operator[] to return the final values.

John Zwinck
  • 223,042
  • 33
  • 293
  • 407