Display command-line arguments : command line arguments « Development « C++ Tutorial






#include <iostream> 
using namespace std; 
 
int main(int argc, char *argv[]) 
{ 
 
  for(int i = 0; i < argc; i++) { 
    cout << argv[i] << "\n"; 
  } 
 
  return 0; 
}
main








5.11.command line arguments
5.11.1.Display command-line arguments
5.11.2.Using command-line arguments for copying files
5.11.3.Sum the two numeric command line arguments