HKComputer
asked on
Recieving parameters on the command line
I'm trying to program a very elementary program (to work with another software vendors program) that needs to be able to accept two parameters from the command line.
The instructions I have from the software vendor say: When [TheirSoftware] 'calls' or invokes [MyProgram], it passes two parameters on the command line. The first parameter is the exact name and path of the [first text file generated by TheirSoftware] and the second paraemter is the exact name and path of the [text file to be passed back to TheirSoftware].
So my program will be invoked like this:
MyProgram c:\somedirectory\original. txt c:\somedirectory\new.txt
How do I read or use the parameters that are being passed to MyProgram?
The instructions I have from the software vendor say: When [TheirSoftware] 'calls' or invokes [MyProgram], it passes two parameters on the command line. The first parameter is the exact name and path of the [first text file generated by TheirSoftware] and the second paraemter is the exact name and path of the [text file to be passed back to TheirSoftware].
So my program will be invoked like this:
MyProgram c:\somedirectory\original.
How do I read or use the parameters that are being passed to MyProgram?
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER