From: Stephen Brokenshire Date: Sat, 1 Oct 2016 15:36:50 +0000 (+0100) Subject: FAQ: Fix typos in section 5.14 (#1047) X-Git-Tag: curl-7_51_0~126 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a1d538963c5861d729eea2b4bb271fad03217d1;p=thirdparty%2Fcurl.git FAQ: Fix typos in section 5.14 (#1047) Type required for YourClass::func C++ function (using size_t in line with the documentation for CURLOPT_WRITEFUNCTION) and missing second colon when specifying the static function for CURLOPT_WRITEFUNCTION. --- diff --git a/docs/FAQ b/docs/FAQ index d9e538aff4..8d37746fc5 100644 --- a/docs/FAQ +++ b/docs/FAQ @@ -1385,14 +1385,14 @@ FAQ member function that is passed a pointer to the class: // f is the pointer to your object. - static YourClass::func(void *buffer, size_t sz, size_t n, void *f) + static size_t YourClass::func(void *buffer, size_t sz, size_t n, void *f) { // Call non-static member function. static_cast(f)->nonStaticFunction(); } // This is how you pass pointer to the static function: - curl_easy_setopt(hcurl, CURLOPT_WRITEFUNCTION, YourClass:func); + curl_easy_setopt(hcurl, CURLOPT_WRITEFUNCTION, YourClass::func); curl_easy_setopt(hcurl, CURLOPT_WRITEDATA, this); 5.15 How do I get an FTP directory listing?