I am currently writing a callback function in C :
static size_t writedata(void *ptr, size_t size, size_t nmemb, void *stream){ size_t written = fwrite(ptr, size, nmemb, (FILE)*stream); return written; }
This function will be used in another function that executes an HTTP request, retrieves the request, and writes it to the local computer. This writedata function will be used for a later part. The whole operation must be multithreaded , so I doubted between write and fwrite . Can someone help me highlight the differences between write() and fwrite() in C , so I could choose which one works best for my problem?
c ++ c
cybertextron
source share