Printing the index and value of command-line arguments in C++