Reason to Pass a Pointer by Reference in C++? -
under circumstances want utilize code of nature in c++?
void foo(type *&in) {...} void fii() { type *choochoo; ... foo(choochoo); }
you want pass pointer reference if have need modify pointer rather object pointer pointing to.
this similar why double pointers used; using reference pointer safer using pointers.
c++ pointers reference
No comments:
Post a Comment