void func(char**& arg1);
int main() {
char* container[3] = { "First", "Second", "Third" };
char** pCon = &container[0];
func(pCon); // This works
func(&container[0]); // no known conversion from char** to char**&
}
I am clearly missing something here. My logic says that these two should be the same thing.
You cannot bind a non-const reference to a temporary, e.g., you cannot bind a temporary obtained from the address-of operator to a non-const reference.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With