Re: [Dev-C++] How to set program arguments?
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: <Met...@ao...> - 2002-08-28 10:03:09
|
no...@ho... wrote
> I do not think it runs.
>
Yes it works, but not as mudeth wrote it.
I made this tiny modification to his code and it runs ok for me here :
argv[1]="-output";
argv[2]="foo.bar";
for(int i=0;i<=2;i++)
cout<<argv[i];
And of course, argv[0] is initialised with the exec name by the application
itself.
But however, it would be nice to get a menu option to set these startup
parameters instead of doing this not-so-clean hack.
Kind regards
Seb
|