How to run multiple arguments in Cygwin
- by danutenshu
I've been trying to run a program that will invert the order of a string and to run it, I have to type a second argument in prompt.
int main(int argc, char* argv[])
{
string text = argv[2];
for (int num=text.size(); num>./0; num--)
{
cout << text.at(num);
}
return 0;
}
e.g. ./program lorem result: merol