Copy argv into new array
问题 I'm getting a segmentation fault for the following code. Can somebody explain why? I would like to be able to copy the contents of argv into a new array, which I called rArray. #include <iostream> using namespace std; int main( int argc, char **argv) { char **rArray; int numRows = argc; cout << "You have " << argc << " arguments:" << endl << endl; cout << "ARGV ARRAY" << endl; for (int i = 0; i < argc; i++) { cout << argv[i] << endl; } cout << endl << endl << "COPIED ARRAY" << endl; for(int i