Could someone please explain what an implicit pointer is, The book I am learning from (currently learning about returning references) says "When a function returns a reference, it returns a implicit pointer to its return value". I've tried looking this up but all I can find is stuff that either I dont think has anything to do with it, or it seems like it might be too advanced so I do not understand what it is talking about.
It sounds like the author misspoke. There's no such thing as an "implicit pointer". What the author meant was that references are more or less equivalent to pointers:
1 2 3 4 5 6 7
int &f(bool x){
staticint a = 1;
staticint b = 2;
if (x)
return a;
return b;
}
which is functionally equivalent to
1 2 3 4 5 6 7
int *f(bool x){
staticint a = 1;
staticint b = 2;
if (x)
return &a;
return &b;
}