code: задание реализовано

master
Ilya (OgarkovIA) 6 месяцев назад
Родитель 04ec2cb372
Сommit 2cc16d900d

@ -2,22 +2,22 @@
<CodeBlocks_layout_file>
<FileVersion major="1" minor="0" />
<ActiveTarget name="Debug" />
<File name="text.cpp" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="main.cpp" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="0" />
<Cursor1 position="204" topLine="0" />
</Cursor>
</File>
<File name="main.cpp" open="1" top="0" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="histogram.cpp" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="204" topLine="0" />
<Cursor1 position="0" topLine="0" />
</Cursor>
</File>
<File name="svg.cpp" open="1" top="1" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="text.cpp" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="0" />
</Cursor>
</File>
<File name="histogram.cpp" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="svg.cpp" open="1" top="1" tabpos="2" split="0" active="1" splitpos="0" zoom_1="-1" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="0" />
</Cursor>

@ -69,9 +69,17 @@ Input download(const string& address) {
res = curl_easy_perform(curl);
if (res != CURLE_OK) {
curl_easy_strerror(res); // cerr
curl_easy_strerror(res);
exit(1);
}
if(!res) {
long req;
res = curl_easy_getinfo(curl, CURLINFO_SIZE_DOWNLOAD_T, &req);
if(!res) {
cerr<<"Request size: "<<req<< " bytes\n";
}
}
curl_easy_cleanup(curl);
}
return input_data(buffer, false);

Загрузка…
Отмена
Сохранить