build: настройка cURL
Этот коммит содержится в:
12
main.cpp
12
main.cpp
@@ -6,6 +6,8 @@
|
||||
#include "histogram.h"
|
||||
#include "text.h"
|
||||
#include "svg.h"
|
||||
#include <curl/curl.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
//Ñîçäàíèå ñòðóêòóðû Input äëÿ âõîäíûõ äàííûõ
|
||||
@@ -21,7 +23,7 @@ Input input_data(istream& in, bool prompt)
|
||||
size_t number_count;
|
||||
Input stct;
|
||||
//Ââîä êîëè÷åñòâà ýëåìåíòîâ ìàññèâà
|
||||
if (promt)
|
||||
if (prompt)
|
||||
{
|
||||
cerr << "Enter number count ";
|
||||
}
|
||||
@@ -29,7 +31,7 @@ Input input_data(istream& in, bool prompt)
|
||||
//Ââîä ìàññèâà
|
||||
vector<double> Numbers(number_count);
|
||||
stct.Numbers.resize(number_count);
|
||||
if (promt)
|
||||
if (prompt)
|
||||
{
|
||||
cerr << "Enter array:\n";
|
||||
}
|
||||
@@ -39,7 +41,7 @@ Input input_data(istream& in, bool prompt)
|
||||
in >> stct.Numbers[i];
|
||||
}
|
||||
//Ââîä êîëè÷åñòâà êîðçèí
|
||||
if (promt)
|
||||
if (prompt)
|
||||
{
|
||||
cerr << "Enter bin count\n";
|
||||
}
|
||||
@@ -50,8 +52,10 @@ Input input_data(istream& in, bool prompt)
|
||||
|
||||
int main()
|
||||
{
|
||||
curl_global_init(CURL_GLOBAL_ALL);
|
||||
|
||||
//Ââîä ìàññèâà è êîëè÷åñòâà êîðçèí
|
||||
auto in = input_data(cin);
|
||||
auto in = input_data(cin, true);
|
||||
|
||||
//Ñîçäàíèå âåêòîðà bins äëÿ ãèñòîãðàììû
|
||||
vector<size_t> bins = make_histogram(in.Numbers, in.bin_count);
|
||||
|
||||
Ссылка в новой задаче
Block a user