![]() |
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. |
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.
|
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 09:11. |