79510515

Date: 2025-03-15 01:58:59
Score: 1
Natty:
Report link

Question is why does &response_string work where a C char* 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.

Reasons:
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Hammdist