what is the difference between the following two approaches:
#include <iostream>
using namespace std;
int main(int argc, char* argv[]) {
cout << "argc = " << argc << endl;
for(int i = 0; i < argc; i++)
cout << "argv[" << i << "] = " << argv[i] << endl;
return 0;
}
#include <iostream>
using namespace std;
int main(int argc, char** argv) {
cout << "argc = " << argc << endl;
for(int i = 0; i < argc; i++)
cout << "argv[" << i << "] = " << argv[i] << endl;
return 0;
}
both output the same results, one has a parameter of array of char pointers, the other has a pointer to pointer of character.