Skip to content

Commit

Permalink
FAQ: Fix typos in section 5.14 (curl#1047)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sbrokenshire authored and bagder committed Oct 1, 2016
1 parent 9eda44a commit 2a1d538
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/FAQ
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down

0 comments on commit 2a1d538

Please sign in to comment.