Last Updated: February 25, 2016
·
1.305K
· lokiastari

C++ command line arguments

Make command line arguments easy to use:

int main(int argc, char* argv[])
{
    std::vector<std::string>   args(argv[0], argv[argc]);
    // Use 0 if you want all the arguments including the
    // application. Use 1 if you just want the arguments.

    // STUFF
}

2 Responses
Add your response

That's actually C++

over 1 year ago ·

@ehevutov That's why the title is "C++ command line arguments"

Unfortunately coderwall does not support the tag C++ yet.

over 1 year ago ·