command line args

Sean Kelly (kelly@physics.ucla.edu)
Tue, 25 Aug 1998 11:14:43 -0700 (PDT)



Hi Rooters,

My question is regarding how does CINT deals with command line arguments ?

eg: this doesn't work

.L cmd.C
main(3,{"main","foo","blah"})

#include <iostream.h>
main(int argc, char* argv[]) {
for(int i=0; i<argc;i++){
cout << argv[i] << endl;
}
}

wheras this does

.L cmd.C
main()

#include <iostream.h>
main(){
int argc = 3;
char* argv[] = {"main", "foo", "blah"};
for(int i=0;i<argc;i++){
cout << argv[i] << endl;
}
}

thanks

Sean Kelly
kelly@physics.ucla.edu