Since type c is equal to char[4] , that is, aray of four char s. Your link requires char* , that is, a pointer to char .
Arrays are not pointers. In most cases, they break up into a pointer to the first element when using it, but this shortened pointer is temporary. Thus, it cannot communicate with a non-constant link.
Why is your function accepting the link in the first place? It would be great if you take char* .
source share