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
}
Written by LokiAstari
Related protips
2 Responses

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
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#C
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#