Apparently I will die without understanding how chars work but I am trying. Part of what I don't understand here is where the const designation is coming from. The supposed-to-be-helpful carat is pointing to a close parenthesis. So which variable is magically a const when I've declared neither as such? (At least not on purpose).
Thank you both for your replies, which do make things clearer for me. But what about the "const" in the error message. Are char arrays constant by default? It feels misleading to me when I haven't declared tmp as const char yet the error indicates a const char is involved here.
No, but strcpy is basically promising not to change whatever is in the second element. You are passing your array pointer to a char array and it is promising to treat it as a const char array and not change it in any way.
tmp is not the one it is complaining about. It's text that is a single char and not a pointer to a char array.