code: аргументы функции main и проаерка количества

master
EfimovaLA 11 месяцев назад
Родитель 95f7257849
Сommit 6f946f7f9b

1
.gitignore поставляемый

@ -5,3 +5,4 @@ lb.layout
unittest.depend unittest.depend
curl/ curl/
main.o main.o
unittest.layout

@ -40,8 +40,17 @@ Input input_data(istream& stream, bool prompt)
} }
int main() int main(int argc, char* argv[])
{ {
if (argc > 1){
auto i = 0;
while (i < argc){
cerr << "arg[" << i << "] = " << argv[i] << endl;
i++;
}
return 0;
}
curl_global_init(CURL_GLOBAL_ALL); curl_global_init(CURL_GLOBAL_ALL);
bool prompt = true; bool prompt = true;
auto in = input_data(cin, prompt); auto in = input_data(cin, prompt);

Загрузка…
Отмена
Сохранить