code: add curl
Этот коммит содержится в:
2
.gitignore
поставляемый
2
.gitignore
поставляемый
@@ -2,3 +2,5 @@
|
|||||||
/obj
|
/obj
|
||||||
/lab01.depend
|
/lab01.depend
|
||||||
/lab01.layout
|
/lab01.layout
|
||||||
|
/curl
|
||||||
|
|
||||||
|
|||||||
7
main.cpp
7
main.cpp
@@ -1,5 +1,6 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include <curl/curl.h>
|
||||||
#include "histogram.h"
|
#include "histogram.h"
|
||||||
#include "text.h"
|
#include "text.h"
|
||||||
#include "svg.h"
|
#include "svg.h"
|
||||||
@@ -32,11 +33,11 @@ Input input_data(istream& in, bool prompt = true)
|
|||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
bool show_prompts; // User choice: true to show prompts, false to hide them
|
curl_global_init(CURL_GLOBAL_ALL);
|
||||||
|
bool show_prompts;
|
||||||
cout << "Show prompts? (1 for yes, 0 for no): ";
|
cout << "Show prompts? (1 for yes, 0 for no): ";
|
||||||
cin >> show_prompts;
|
cin >> show_prompts;
|
||||||
|
|
||||||
Input in = input_data(cin, show_prompts);
|
Input in = input_data(cin, show_prompts);
|
||||||
vector<size_t> bins = make_histogram(in.numbers, in.bin_count);
|
vector<size_t> bins = make_histogram(in.numbers, in.bin_count);
|
||||||
show_histogram_text(bins);
|
show_histogram_svg(bins);
|
||||||
}
|
}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user