diff options
author | Stephen Brokenshire <stephen@brokenshi.re> | 2016-10-01 16:36:50 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2016-10-01 17:36:50 +0200 |
commit | 2a1d538963c5861d729eea2b4bb271fad03217d1 (patch) | |
tree | bdb3cdb8213be8f9f3af9592fdafee2809256e8f | |
parent | 9eda44a2004af0826ab46594da88e7b0ce58fd38 (diff) |
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.
-rw-r--r-- | docs/FAQ | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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<YourClass*>(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? |