I declared the following char* and tried to pass it to a function that requires a char * as the 3rd argument:
char *echo;
prompt = ssh_userauth_kbdint_getprompt(primarySession, 0, echo);
However, I get the error:
error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
I also tried declaration as char echo; and the passed argument as &echo. But I don't really need the value that this function changes in echo. So I wanted to pass NULL, but I guess I expected that to be a const. I also tried this trick:
char echo;
prompt = ssh_userauth_kbdint_getprompt(primarySession, 0, (char *)(&echo));
Still no success. Suggestions?