Question is why does
&response_string
work where a Cchar*
is expected?
A C char*
is not necessarily expected. Whatever you pass is later given as an argument to the WRITEFUNCTION
. It could be char*
, FILE*
, std::string*
, or any other pointer type depending on how WRITEFUNCTION
is implemented.
Also, why does
response_string.c_str()
core dump if I use that instead of&response_string
?
Probably due to passing a char*
where a std::string*
is expected.