How to run multiple arguments in Cygwin
Posted
by danutenshu
on Stack Overflow
See other posts from Stack Overflow
or by danutenshu
Published on 2010-06-14T17:37:01Z
Indexed on
2010/06/14
17:42 UTC
Read the original article
Hit count: 171
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
© Stack Overflow or respective owner