Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Execute program various times, using different input values 1

Status
Not open for further replies.

Karien

Technical User
May 4, 2004
2
NL
Hi,
Note, I am new to C++.
I wrote a program. I want to execute it automatically more than once, using various input values (arguments?).
1) Should I use a batch file? If yes, then:
2) What exactly is a batch file, where can I find more information about it?
(I found something in the help-function in the C++ program: 'how to work with batchfiles', but it does not display the explanation. It says: not in current subset. Why?)
 
It's incomplete task specification.
1. To execute a program automatically more than once = it's not a programming language issue: it's operational environment (OS) topic. The C++ compiler creates programs - that's all.
2. Where is a source of various input values?
Of course, you may write a program (in C++) to execute other programs: use system() library function (or use _exec() family functions). But is it your goal? I don't know...
 
Shure you can start a programm several times with a batch file:
something like
Code:
C:\ProgramFolder\myprog.exe input_val1.1 input_val1.2
C:\ProgramFolder\myprog.exe input_val2.1 input_val2.2
C:\ProgramFolder\myprog.exe input_val3.1 input_val3.2
...
Here a link to MS batch docu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top