SD> - program asks user to input a number
SD> - program goes to This_Program
SD> (the program that I tried to stick in header file)
SD> - User inputs a letter/number
SD> - This_Program screens out all but numbers
SD> - Saves the input as ch[i];
SD> - keeps getting inputs until carriage return is pressed
SD> - adds up the number (so it becomes one number,
SD> but all the numbers in their correct decimal place)
SD> - This_Program ends and goes back to the mother program,
SD> carrying the complete number with it
You don't want to use the header file, then.
What you need to do is have the program which performs the
input routine create a config file, or a data file, or
whatever you want to call it. Then your other programs will
use that file as their data source.
You could just make the input routine a part of each program
for which it is required, and have it read the value from
the file, if the file exists, and then allow the user to
add to the number, edit the number, enter a new number, or
just continue with the number as it is given in the file.
You don't require the use of an array, either, since you are
using a running total. You can just use one variable to keep
the present total, and another for the new input. You might
also allow for the use of negative numbers, I suppose, if
they are desired, if only to remove numbers from the total.
> ] You're trying to make me paranoid, but I'm on to your tricks
---
---------------
* Origin: *YOPS ]I[* 8.4 GIG * RA/FD/FE * Milwaukee, WI (1:154/750)
|