code: curl_easy_init() вывод
Этот коммит содержится в:
13
main.cpp
13
main.cpp
@@ -42,16 +42,19 @@ Input input_data(istream& in, bool promt = false) {
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
|
||||
curl_global_init(CURL_GLOBAL_ALL);
|
||||
|
||||
if(argc > 1) {
|
||||
cout << "argc = " << argc << endl;
|
||||
for(int i = 0; i < argc; i++){
|
||||
cout << "argv[" << i << "] = " << argv[i] << endl;
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, argv[1]);
|
||||
res = curl_easy_perform(curl);
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
curl_global_init(CURL_GLOBAL_ALL);
|
||||
|
||||
auto in = input_data(cin);
|
||||
auto bins = make_histogram(in.numbers, in.bin_count);
|
||||
show_histogram_svg(bins);
|
||||
|
||||
Ссылка в новой задаче
Block a user