invalid conversion from 'char' to 'const char*' My intention was to overload a function to handle optional parameters. My code looks like

void functionA(const char *errorMsg) {
  functionA('0', errorMsg);
}

void functionA(char errorCode, const char *errorMsg) {
    ...
}


The line functionA('0',... generates the error

invalid conversion from 'char' to 'const char*'


How do I fix that?
What do your prototypes look like? I suspect that the compiler thinks that it is calling the first instance of functionA() and is trying to cast '0' to a 'const char *` and that isn't going to work…

If you don't have prototypes for both signatures, then adding the second one may solve your problem. If you do, I'm puzzled.