« first day (1535 days earlier)      last day (1309 days later) » 

12:59 AM
Hello everybody
Anybody available for help?
 
 
2 hours later…
3:01 AM
Just post the question instead of asking to ask
 
 
11 hours later…
jrh
2:27 PM
Sometimes I see code that takes a reference to a pointer, is there a purpose to that? I have a hard time coming up with one, I can't think of a reason to use a non-const ref, and a const ref seems like it would be semantically the same as doing Something* const something;, and unlike taking a reference to a large struct or something, there's no performance benefit since a pointer is already small (e.g., 64 bits).
 
@jrh the reason why some people use "type **" in C
to change what the pointer points to
int* a;
void func(int*& a){a = nullptr;}
void func2(int* a){a = nullptr;}
func can change the value in scope of the caller, func2 can not
 
jrh
that's a good example, I can see why that would be clearer / safer than **
 

« first day (1535 days earlier)      last day (1309 days later) »