Char ** and Confusion of Arguments

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. My logic says these two should be the same.

+6
source share
1 answer

You cannot bind a non-constant link to a temporary one, for example, you cannot bind a temporary value received from an address operator to a non-constant link.

+11
source

Source: https://habr.com/ru/post/952466/


All Articles