Is there a way to get all the arguments and put them in one string? I'm very new to C++, so I need all the help I can get. Here's what I have here:
#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;
}
Could someone explain or add to my code how it would work, I'm guessing something along the lines of (I'm a python coder, so this may be wrong): mystring = ''; and after the for loop: mystring = mystring + argv
That's probably completely wrong... but whatever, lol.