code: добавление аргументов в int main
Этот коммит содержится в:
11
main.cpp
11
main.cpp
@@ -1,3 +1,4 @@
|
|||||||
|
#include <curl/curl.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include "histogram.h"
|
#include "histogram.h"
|
||||||
@@ -45,8 +46,16 @@ input_data(istream& cin, bool prompt) {
|
|||||||
return in;
|
return in;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int main()
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if (argc>1){
|
||||||
|
for (size_t i=0; i<argc; i++){
|
||||||
|
cout<<argv[i]<<endl;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
curl_global_init(CURL_GLOBAL_ALL);
|
||||||
auto in = input_data(cin, true);
|
auto in = input_data(cin, true);
|
||||||
auto bins = make_histogram(in.numbers, in.bin_count, in.number_count, in.max_count);
|
auto bins = make_histogram(in.numbers, in.bin_count, in.number_count, in.max_count);
|
||||||
show_histogram_svg(bins, in.max_count, in.bin_count);
|
show_histogram_svg(bins, in.max_count, in.bin_count);
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user