Why use double indirection? or Why use pointers to pointers?

前端 未结 18 2231
失恋的感觉
失恋的感觉 2020-11-22 10:37

When should a double indirection be used in C? Can anyone explain with a example?

What I know is that a double indirection is a pointer to a pointer. Why would I ne

18条回答
  •  春和景丽
    2020-11-22 11:27

    Strings are a great example of uses of double pointers. The string itself is a pointer, so any time you need to point to a string, you'll need a double pointer.

提交回复
热议问题