Сравнить коммиты

..

3 Коммитов

Автор SHA1 Сообщение Дата
LiTekho 594f79f3d3 code: добавлен libcurl
2 лет назад
LiTekho 73fea9ae40 code: add bool prompt
2 лет назад
LiTekho 351d7655e0 code: input data add(instream)
2 лет назад

7
.gitignore поставляемый

@ -0,0 +1,7 @@
/bin
/obj
/prj.depend
/prj.layout
/type
/unitest.layout
/curl

@ -6,12 +6,56 @@
#include "histogram.h"
#include "text.h"
#include "svg.h"
#include <curl/curl.h>
using namespace std;
const size_t SCREEN_WIDTH = 80;
const size_t MAX_ASTERISK = SCREEN_WIDTH - 3 - 1;
struct Input
{
vector<double> numbers;
size_t bin_count{};
};
Input
input_data(istream& in, bool prompt)
{
if (prompt)
{
cerr << "Enter number count: ";
}
size_t number_count;
in >> number_count;
Input ik;
ik.numbers.resize(number_count);
cerr << "Input numbers: ";
for (size_t i = 0; i < number_count; i++)
{
cin >> ik.numbers[i];
}
cerr << "Input bin count: ";
cin>> ik.bin_count;
return ik;
}
int main()
{
curl_global_init(CURL_GLOBAL_ALL);
auto in = input_data(cin, true);
auto bins = make_histogramm(in.numbers, in.bin_count);
show_histogram_svg(bins);
getch();
return 0;
}
/*
struct Input
{
vector<double> numbers;
@ -47,4 +91,4 @@ int main()
show_histogram_svg(bins);
return 0;
}
}*/

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