Send varible into C program

Go4Expert Member
21Jun2007,01:11   #1
chico1st's Avatar
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.
Go4Expert Member
21Jun2007,02:07   #2
chico1st's Avatar
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.
Team Leader
21Jun2007,02:23   #3
DaWei's Avatar
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).