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
  • 2,005
  • 29
  • 75

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
  • 239,568
  • 38
  • 324
  • 436