d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Using A Driver And Input File Unix Command?
Add Reply New Topic New Poll
Member
Posts: 24,101
Joined: Nov 8 2007
Gold: 5,561.70
Apr 1 2013 08:13pm
So this is how I usually test my code

gcc test.c program.c -o test.x

but how do you incoorperate a driver.o and a test.input into it so that the test to run using the driver and the input from test.input?

gcc test.c program.c driver.o test.input -o public.x...?
Member
Posts: 4,688
Joined: Jun 20 2009
Gold: 12,590.00
Apr 2 2013 08:40am
I'm not really understanding the question however do you know about command line arguments?

does you main function look like this:

Code

int main(int argc, char const *argv[]) {
/* code */
return 0;
}


with argv and argc? or something similar?


That's generally how you would do input files
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll