cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Help: getting the current url

From: Joe Nardone <jnardone_at_gmail.com>
Date: Thu, 10 Apr 2008 16:34:03 -0400

> int connect(const char* aURL)
> {
> const char *currentUrl;
> CURL *urlHandler;
> curl_easy_setopt(urlHandle, CURLOPT_URL, aURL);
> curl_easy_perform(urlHandle);
>
>
> if (aUrl == currentUrl)
> {
> connect(aURL);
> }
> else
> {
> printf(currentURL);
> }
> }

You never assign currentURL. Why would you ever expect it to contain
useful data?

It's been troubling on this list lately the number of people who don't
need help with CURL, but with the basics of writing code.

Joe
Received on 2008-04-10