adishavit / argh

Argh! A minimalist argument handler.
BSD 3-Clause "New" or "Revised" License
1.33k stars 93 forks source link

accept vector<string> for argv #74

Open sfinktah opened 2 years ago

sfinktah commented 2 years ago

Because sometimes you don't have access to the command line arguments in their raw form...

std::vector<std::string> args;
int main(int argc, char** argv) {
   for (size_t i=0; i < argc; ++i)
      args.emplace_back(argv[0]);
   run_application();
}

void application() {
   auto cmdl = argh::parser(args);
   // ...
}