cURL / Mailing Lists / curl-library / Single Mail

curl-library

init in a different function

From: Fredrik Gustafsson <iveqy.mailbox_at_gmail.com>
Date: Thu, 16 Mar 2006 20:41:13 +0100

Hi,
I think this is a curl question rather than a cpp question. If it isn't
I apologize for wasting your time.

this code gives me segment fault (in short):

int main()
{
    CURL * curl;
    init_c(curl);
    return 0;
}

void init_c(CURL * curl)
{
    curl = curl_easy_init();
}

I don't get it. If I put the line "curl = curl_easy_init()" in main() it
works fine...

thanks
/iveqy
Received on 2006-03-16