code:curlWriteFromLink
Этот коммит содержится в:
5
Lab1.cbp
5
Lab1.cbp
@@ -14,9 +14,12 @@
|
||||
<Compiler>
|
||||
<Add option="-g" />
|
||||
<Add directory="include" />
|
||||
<Add directory="curl/include" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add option="-static-libstdc++" />
|
||||
<Add library="curl/lib/libcurl.dll.a" />
|
||||
<Add directory="curl/lib" />
|
||||
</Linker>
|
||||
</Target>
|
||||
<Target title="Release">
|
||||
@@ -39,6 +42,8 @@
|
||||
<Add directory="D:/Projects_Code_Blocks/2_halfYear/Lab4/Lab1/curl/include" />
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Add option="-static-libstdc++" />
|
||||
<Add option="-static-libgcc" />
|
||||
<Add library="curl/lib/libcurl.dll.a" />
|
||||
<Add directory="D:/Projects_Code_Blocks/2_halfYear/Lab4/Lab1/curl/lib" />
|
||||
</Linker>
|
||||
|
||||
20
main.cpp
20
main.cpp
@@ -6,7 +6,6 @@ using namespace std;
|
||||
#include "svg.h"
|
||||
|
||||
|
||||
//313
|
||||
struct Input {
|
||||
std::vector<double> numbers;
|
||||
size_t bin_count{};
|
||||
@@ -14,9 +13,24 @@ struct Input {
|
||||
|
||||
Input input_data(istream& in, bool promt);
|
||||
|
||||
int main()
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
curl_global_init(CURL_GLOBAL_ALL);
|
||||
if(argc > 1 ){
|
||||
curl_global_init(CURL_GLOBAL_ALL);
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Input in = input_data(cin,true);
|
||||
std::vector<size_t> bins = make_histogram(in.numbers, in.bin_count);
|
||||
|
||||
Ссылка в новой задаче
Block a user