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,478
  • 13
  • 56
  • 84

5 Answers5

3

Three dimensional arrays.

Martin York
  • 257,169
  • 86
  • 333
  • 562
2

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

Michael Aaron Safyan
  • 93,612
  • 16
  • 138
  • 200
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
  • 257,169
  • 86
  • 333
  • 562