3

Possible Duplicate:
Uses for multiple levels of pointer dereferences?

I have used functions with doubly dereferenced pointers (**var) to return values. However, I was recently asked a question to figure out a use-case where a triple dereferencing (***var) may be needed. I couldn't think of any practical scenario. Does anyone have any experience here?

Community
  • 1
  • 1
Kiran
  • 5,360
  • 12
  • 55
  • 84

5 Answers5

3

Three dimensional arrays.

Martin York
  • 246,832
  • 83
  • 321
  • 542
2

If you have a tensor, then you would need triple dereferencing.

Michael Aaron Safyan
  • 90,931
  • 15
  • 133
  • 196
1

if you want to have a two-dimensional pointer array used to referencing a general two-dimensional array, you would need triple dereferencing.

1

A two dimensional array containing pointers to functions.

antler
  • 151
  • 1
  • 4
0

A pointer to a handle.

Martin York
  • 246,832
  • 83
  • 321
  • 542