Ok, I know I can do loop like this:
for (int i=1; i<=argc-1;i++) {
cout << argv[i] << endl;
}
But this way double quotes are l
It's the shell that removes the quotes. If you want the shell to pass the quotes to you, you have to escape them:
$ ./my-program \"hello\ world\"
Note that I escape the space as well, to make it one argument.
When you need the original command line, your can use the GetCommandLine() API function.