Sasha (KobzevAV) 2 лет назад
Родитель a2ccc8d890
Сommit 5ac6feb8a0

@ -1,40 +1,52 @@
#include <iostream>
#include <sstream>
#include <vector>
#include <curl/curl.h>
#include "histogram.h"
#include "text.h"
#include "svg.h"
using namespace std;
struct Input {
vector<double> numbers;
size_t bin_count{};
};
Input
input_data(istream& in, bool prompt){
input_data(istream& inp, bool prompt){
size_t number_count;
in >> number_count;
Input inp;
inp.numbers.resize(number_count);
if (prompt){
std::cerr << "enter bin_count";
cerr << "enter number_count";
}
inp >> number_count;
Input in;
in.numbers.resize(number_count);
if (prompt){
std::cerr << "enter numbers";
}
for (size_t i = 0; i < number_count; i++){
in >> inp.numbers[i];
inp >> in.numbers[i];
}
in >> inp.bin_count;
if (prompt){
std::cerr << "enter bin_count";
}
inp >> in.bin_count;
return inp;
return in;
}
int main(int argc, char* argv[]){
curl_global_init(CURL_GLOBAL_ALL);
if (argc > 1 ){
cerr << "argv[0] = " << argv[0] << "argc = " << argc;
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;
}
auto in = input_data(cin, true);

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