Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   Send varible into C program (http://www.go4expert.com/forums/send-varible-c-program-t4788/)

chico1st 21Jun2007 01:11

Send varible into C program
 
Hello I need to send a varible into one of my C programs. I dont know how to write the source code for this or actually call the file (while sending varibles).

Do I need to compile the program as a dll to do this?

Thank you for your time.

chico1st 21Jun2007 02:07

Re: Send varible into C program
 
the reason that i want to do this is because a have a C program that makes an output file but I call that program 30 times to make 30 output files.. so I want to send a string in to use as the output file name.

DaWei 21Jun2007 02:23

Re: Send varible into C program
 
Put the "variable" on the command line as an argument. See the usage for main's arguments, argc and argv []. Give it a shot and if you have troubles, post back with your attempted code.

Be sure and learn about code tags before you post code (see the "Before you make a query" thread).


All times are GMT +5.5. The time now is 01:41.