dole_4
09-24-2002, 10:34 AM
Hi,
I'm making a program that will read information from a file, and when exited, will write to a new file. These files are to be inputted at the time of typing the executable file.
eg <executable file> <file.inp> <file.out>
Now, i know how to read from/print to the files using fopen/close, fgets/puts, sscanf/sprintf, but what i dont know is how to actually let the program know that the words typed after the executable are the names of the 2 files.
Does it have to do with putting declarations inside the main brackets?
eg
int main( xxx, yyy)
I tried this but kept getting errors as it says the first and second declarations need to be an int and **.
Any help would be very much appreciated.
Thanks.
I'm making a program that will read information from a file, and when exited, will write to a new file. These files are to be inputted at the time of typing the executable file.
eg <executable file> <file.inp> <file.out>
Now, i know how to read from/print to the files using fopen/close, fgets/puts, sscanf/sprintf, but what i dont know is how to actually let the program know that the words typed after the executable are the names of the 2 files.
Does it have to do with putting declarations inside the main brackets?
eg
int main( xxx, yyy)
I tried this but kept getting errors as it says the first and second declarations need to be an int and **.
Any help would be very much appreciated.
Thanks.