I have an executive program
I want to call it up
And pass values to it directly without the need to write down every time i use the program
Example
I have exe that calculates the sum of two numbers
When you run the program
Required the enter the first number
Then enter the second number
I want to write a code
can call for the program and pass the first number, and his second direct
The program calculates the total only
Without the required entry
Yes, that's know as redirecting the standard input. Basically cin get's it's data from a file instead of what you type into the Keyboard. You can do the same with standard output cout and error cerr.
while(!ins.eof())
{
for (int j=0 ;j<64;j++)
ins>>Fkey[j];
EX(FKey);
}
its reading from file to array but
when its start reading its not stop till reach the final value in the file
and call EX() once
i want to use subpro "EX()" for each value in the file
for example there are 10 lines
each line is value need to read and put in array and use in EX()
then read the next value
while(!ins.eof())
{
for (int j=0 ;j<64;j++)
ins>>Fkey[j];
EX(FKey);
}
am talking about this one
i want to read the first value from file and put it in array and use the array in other subprogram
then read the next value and do the same each time
but its still reading to the end of the file so am using only one value (the last one) and the other values not using