From 34888017926bae0e98909450d5c8668e3ee5a19f Mon Sep 17 00:00:00 2001 From: MovsisianRG Date: Tue, 21 May 2024 22:37:18 +0300 Subject: [PATCH] code: added argv and argc --- main.cpp | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index bf2cfda..ddb3497 100644 --- a/main.cpp +++ b/main.cpp @@ -5,6 +5,8 @@ #include "text.h" #include + + using namespace std; //const size_t SCREEN_WIDTH = 80; @@ -58,8 +60,28 @@ input_data(istream& in, bool promt) return input; } -int main() +int +main(int argc, char* argv[]) { + + if( argc > 1 ){ + + CURL* curl = curl_easy_init(); + + cout << argc << '\n'; + //while (true) + for (int i = 0; i < argc; i++){ + + cout << argv[i] << " "; + } + cout << endl; + + curl_easy_cleanup(curl); + + + return 0; + } + curl_global_init(CURL_GLOBAL_ALL); auto input = input_data(cin, true);