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