code: argc и argv
Этот коммит содержится в:
14
main.cpp
14
main.cpp
@@ -1,6 +1,7 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#include <curl/curl.h>
|
||||||
#include "histogram.h"
|
#include "histogram.h"
|
||||||
#include "text.h"
|
#include "text.h"
|
||||||
#include "svg.h"
|
#include "svg.h"
|
||||||
@@ -34,8 +35,19 @@ input_data(istream& tin, bool promt)
|
|||||||
return in;
|
return in;
|
||||||
}
|
}
|
||||||
|
|
||||||
int main()
|
int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
|
|
||||||
|
if (argc > 1)
|
||||||
|
{
|
||||||
|
cout << argc;
|
||||||
|
for (size_t i = 0; i < argc; i++)
|
||||||
|
{
|
||||||
|
cout << "argv[" << i << "]=" << argv[i];
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
curl_global_init(CURL_GLOBAL_ALL);
|
||||||
auto in = input_data(cin, false);
|
auto in = input_data(cin, false);
|
||||||
auto B = make_histogram(in.A, in.bin);
|
auto B = make_histogram(in.A, in.bin);
|
||||||
show_histogram_svg (B);
|
show_histogram_svg (B);
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user