From 383539244425a7cf806f9a05a585c5aa990bc260 Mon Sep 17 00:00:00 2001 From: Ashik K Date: Sun, 26 Mar 2023 09:58:15 +0200 Subject: [PATCH] Command line argument parsing with getopt --- fetcher.cc | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/fetcher.cc b/fetcher.cc index fdb7ca7..b7628a0 100644 --- a/fetcher.cc +++ b/fetcher.cc @@ -2,8 +2,11 @@ #include #include +#include #include +#include + #include #include #include @@ -13,13 +16,30 @@ int main(int argc, char *argv[]) { - if (argc !=3 ) { + std::string exbid, apikey; + if (argc !=5 ) { std::cout<<"Please run as "< "< 0) */std::cout<<"url to fetch is "<