Math-Linux.com

Knowledge base dedicated to Linux and applied mathematics.

Home > C++ > FAQ C++ > FAQ C++ - STL > How to get command-line parameters in a C++ vector<string> (...)

How to get command-line parameters in a C++ vector<string> ?


using namespace std;
int main(int argc, char* argv[])
{
   vector<string> parameters(argv, argv+argc);
   ...
}

Also in this section

  1. How to split a string in C++ using STL ?
  2. How to get command-line parameters in a C++ vector<string> ?
  3. How to print the elements of a C++ std::vector with GNU Debugger GDB ?
  4. How to convert string to lower case or UPPER case in C++ ?
  5. How to sum elements of a C++ std::vector ?