Ok, so I understand pointers and references, ive used them before plenty of times. Thing is that I just doin't understand the concept of returning a pointer or a reference..
Are you trying to return a dynamic allocated object??? To an awaiting pointer that points to allocated stack memory... Thats the only reason I would think is necessary to return a pointer or reference.
But can anybody explain to me other reasons for returning a pointer or reference.
Are you trying to return a dynamic allocated object??? To an awaiting pointer that points to allocated stack memory... Thats the only reason I would think is necessary to return a pointer or reference.
But can anybody explain to me other reasons for returning a pointer or reference.