// Copyleft: Sathiamoorthy Manoharan. #include int main(int argc, char *argv[]) { // argc carries the number of command-line arguments passed in. // argv is string array containing all the arguments passed in. // The first of the arguments (i.e., argv[0]) is the name of the // executable (e.g. a.out), which we aren't printing out here. for ( int j = 1; j < argc; ++j ) { std::cout << argv[j] << std::endl; } return 0; }