code: исправлен порядок принятия переменных
Этот коммит содержится в:
27
main.cpp
27
main.cpp
@@ -26,11 +26,6 @@ Input input_data(istream& stream, bool prompt) {
|
|||||||
|
|
||||||
Input in;
|
Input in;
|
||||||
|
|
||||||
if (prompt){
|
|
||||||
cerr << "Enter number of bins: ";
|
|
||||||
}
|
|
||||||
stream >> in.bin_count;
|
|
||||||
|
|
||||||
in.numbers.resize(number_count);
|
in.numbers.resize(number_count);
|
||||||
|
|
||||||
if (prompt){
|
if (prompt){
|
||||||
@@ -41,6 +36,11 @@ Input input_data(istream& stream, bool prompt) {
|
|||||||
stream >> in.numbers[i];
|
stream >> in.numbers[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (prompt){
|
||||||
|
cerr << "Enter number of bins: ";
|
||||||
|
}
|
||||||
|
stream >> in.bin_count;
|
||||||
|
|
||||||
if (prompt){
|
if (prompt){
|
||||||
cerr << "Enter image height: ";
|
cerr << "Enter image height: ";
|
||||||
}
|
}
|
||||||
@@ -55,11 +55,18 @@ Input input_data(istream& stream, bool prompt) {
|
|||||||
int main(int argc, char* argv[]){
|
int main(int argc, char* argv[]){
|
||||||
|
|
||||||
if (argc > 1){
|
if (argc > 1){
|
||||||
auto i = 0;
|
|
||||||
while (i < argc){
|
CURL* curl = curl_easy_init();
|
||||||
cerr << "arg[" << i << "] = " << argv[i] << endl;
|
|
||||||
i++;
|
if(curl) {
|
||||||
}
|
|
||||||
|
CURLcode res;
|
||||||
|
curl_easy_setopt(curl, CURLOPT_URL, argv[1]);
|
||||||
|
res = curl_easy_perform(curl);
|
||||||
|
|
||||||
|
curl_easy_cleanup(curl);
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user