|
|
Hi,
You can access command line params from within your main function:
int main(int argc, char * argv[])
argc - number of arguments
argv[] - array of aruments
so:
for(int i=0; i < argc; i++)
{
cout << "argv[" << i << "] is:" << argv[i] << '\n';
}
Andy
On Tue, 2005-02-01 at 10:48 +0100, Luo Zhaowu wrote:
> Hi, every body:
>
> My program takes float variable values as input. Assuming my binary file is
> go, and the possible values for one of float variables could be 1.5, 2.5,
> 3.5. I want to change one value of the variable to the other on command
> line (after qmake project, qmake, and make of all source files), doing
> something like:
> go 1.5
> or go 2.5
> or go 3.5
>
> rather than compiling all the source file three times, generating three
> binary files, each for one of the three values.
>
> Could anybody please tell me how to implement the above command line
> parameter list with Qt?
>
> Thanks a lot in advance,
>
> Zhaowu Luo
>
> _________________________________________________________________
> Express yourself instantly with MSN Messenger! Download today it's FREE!
> http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
>
> --
> List archive and information: http://lists.trolltech.com/qt-interest/
--
--
List archive and information: http://lists.trolltech.com/qt-interest/
|
|