struct Curl_easy *curl_easy_init(void)
{
CURLcode result;
struct Curl_easy *data;
/* Make sure we inited the global SSL stuff */
if(!initialized) {
result = curl_global_init(CURL_GLOBAL_DEFAULT);
if(result) {
/* something in the global init failed, return nothing */
DEBUGF(fprintf(stderr, "Error: curl_global_init failed\n"));
return NULL;
}
}
/* We use curl_open() with undefined URL so far */
result = Curl_open(&data);
if(result) {
DEBUGF(fprintf(stderr, "Error: Curl_open failed\n"));
return NULL;
}
return data;
}
結構 Curl_easy *curl_easy_init(void){}
這個宣告是什么意思?我可以用谷歌搜索這個合適的關鍵字嗎?我試過函式指標結構、結構指標等......
uj5u.com熱心網友回復:
這
struct Curl_easy * curl_easy_init(void)
是函式的宣告,其名稱curl_easy_init具有指標回傳型別struct Curl_easy *且沒有引數。
如果成功,函式將回傳更新后的指標
struct Curl_easy *data;
在函式中宣告。否則函式回傳NULL。
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/443510.html
