Reputation: 407
I wrote a callback function to write data into a string variable transferred by curl_easy_perform
.
I've found that the callback function would be called several times (I don't know exactly how many ).
Will The string variable content be overwritten with the subsequent call? How to implement this?
P.S. I've found that link useful.
Upvotes: 1
Views: 427
Reputation: 409356
The number of times the callback is called depends on how much data there is to read.
If you are using C++, then use std::string
, and you won't have that trouble.
Upvotes: 1