Taken from the libcurl programming tutorial on the libcurl site:
libcurl with C++
There's basically only one thing to keep in mind when using C++ instead of C when interfacing libcurl:
The callbacks CANNOT be non-static class member functions
Example C++ code:
class AClass { static size_t write_data(void *ptr, size_t size, size_t nmemb, void ourpointer) { /* do what you want with the data */ } }
What is this limitation for, is it a problem of scope? If each class member has it's own easy_handle then can it then use callbacks to it's own non static member functions? It doesn't go on to say. I can work with this either way, but I'm curious why it exists.
edit: One more thing; does this impose a limitation on creating easy_handle's from within a class? That would greatly pose a problem for my design if so, I'd like each object to have its own easy_handle.