Is there a way to retrieve the arguments in one big string, rather than split into a "char*[]" in C/C++?
It would be nice to get this: "appname --option=value argument argument", rather than "appname", "--option=value", "argument", "argument", etc...
Simply concocting the strings together will not do, since I would like to get the arguments before any OS interaction (i.e.,
Code:
appname --option="hello"
translates into
Code:
appname --option=hello
(quotes are lost). Here is the output of just such a problem:
Code:
bryan@linux-qgp0:~> printargs a "b" ""c""
Argument 0 is: "printargs"
Argument 1 is: "a"
Argument 2 is: "b"
Argument 3 is: "c"
As you can see, the quotation marks are lost...