This is rare in C ++.
In C, it can appear where:
- You use “objects”, which are structures, and you always pass them or create them on the heap as pointers.
- You have collections of pointers such as dynamically allocated arrays, so T **, where T is a type.
- You want to get an array to pass T ***, and it fills your pointer T ** (array of pointers T *).
This will be valid C, but in C ++:
- The first step will be the same. You still allocate objects on the heap and have pointers to them.
- The second part will be different since you will use vector rather than arrays.
- The third part will be different because you are using a link, not a pointer. So you get the vector by going to
vector<T*>& (or vector<shared_ptr<T> >& not T ***
source share