Output command line arguments : command line « Development « C++






Output command line arguments

  
#include <iostream>

using std::cout;
using std::endl;

int main(int argc, char** argv)
{
  if (argc > 1) {
    cout << argv[1];  
    for (int i = 2; i != argc; ++i)
      cout << " " << argv[i];   
  }
  return 0;
}
  
    
  








Related examples in the same category

1.Using command-line arguments