code: Компилируется: но не запускается

main
SukhotinMD 2 недель назад
Родитель 386f6009fc
Сommit 3de2094a93

@ -4,6 +4,8 @@
#include "histogram.h"
#include "text.h"
#include <curl/curl.h>
#include <sstream>
@ -19,6 +21,9 @@ struct Input {
Input
input_data(istream& hin, bool promt = false) {
// Функция ввода
//Создание переменных
@ -56,44 +61,48 @@ input_data(istream& hin, bool promt = false) {
}
Input download(const string& address) {
stringstream buffer;
curl_global_init(CURL_GLOBAL_ALL);
int main(int argc, char* argv[])
{
CURL* curl = curl_easy_init();
if (curl) {
CURLcode res;
curl_easy_setopt(curl, CURLOPT_URL, address.c_str());
res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
if (CURLE_OK != 0) {
cout << curl_easy_strerror(res) << endl;
exit(1);
}
curl_global_init(CURL_GLOBAL_ALL);
CURL* curl = curl_easy_init();
curl_easy_cleanup(curl);
}
return input_data(buffer, false);
}
if (argc > 1) {
if (curl) {
CURLcode res;
curl_easy_setopt(curl, CURLOPT_URL, argv[1]);
res = curl_easy_perform(curl);
curl_easy_cleanup(curl);
if (CURLE_OK != 0) {
cout << curl_easy_strerror(res) << endl;
exit(1);
}
}
return 0;
int main(int argc, char* argv[])
{
Input in;
if (argc > 1) {
in = download(argv[1]);
}
else {
in = input_data(cin, true);
}
string promt;
bool promt1 = false;
@ -116,12 +125,10 @@ int main(int argc, char* argv[])
// Функция main
auto in = input_data(cin, promt1); // Ввод структуры
auto bins = make_histogram(in.numbers, in.bin_count); // Распределние по корзинам
show_histogram_svg(bins); // Вывод графика
curl_easy_cleanup(curl);

Двоичные данные
x64/Debug/ProgUit Lab1.pdb

Двоичный файл не отображается.
Загрузка…
Отмена
Сохранить