curl_slist_append に問題があります。コード:
int my1 = rand() % 100;
int my2 = system ("dir");
int my3= time(NULL);
headers = curl_slist_append(headers,my1);
headers = curl_slist_append(headers,my2);
headers = curl_slist_append(headers,my3);
warning: passing argument 2 of ‘curl_slist_append’ makes pointer from integer without a cast
note: expected ‘const char *’ but argument is of type ‘int’
問題を解決しました。Wireshark はすべて正常に動作することをテストしました。
int my1 = time(NULL);
char str[15];
sprintf(str, "%d", my1);
headers = curl_slist_append(headers,str);