I am reading "Accelerated C++" by Koenig. In chapter 5, Koenig defines a function which has a reference to a vector parameter. In the function body, a new vector is created and assigned to the parameter.
Is a reference to an object analogous to a double pointer in C?
I am imagining a local variable which is a pointer to a data structure on the heap (a vector in this case). The address of this variable (a double pointer) is passed to a function and, in the function body, is dereferenced and assigned the address of a new data structure on the heap (in this case, a new vector).
I realize references have different properties than pointers and that references are not necessarily implemented as pointers. However, is the above a reasonable way to think about things?