06-04-2003, 08:50 PM
Hello all,
1st let me say thanks to all of those that have helped me with my previous posts.
Now onto my new problem. :???:
With the program I am writing, I would like to be able to open what I call a running file and have the program add to it. Basically it would work like this. I will ask the user several questions. For this example lets us name, age. After I have the information, I want to be able to open a file that has the same information from other people and then add the new information to the list. And then have the computer assign the person a number based off a number in the opened file. So if the user is the 10th person entering the information, the program would assign him the number 10 and the next person to use the program would get assigned 11.
I would like the file to look something like this.
""""""""""""""""""""""""""""""""""""""""""""""""
Number (assigned) Name Age
** Chris 22
ect....
""""""""""""""""""""""""""""""""""""""""""""""""
Also, I will need to be able to search this file for key words later on and list any information based on that search.
So if I search for the person with the number 15, I will get the following information
Number - Name - Age
Also if I search for anyone with the age of 22, I would recieve all persons of that age in the above format.
Then I need to save the file and exit the program.
Everytime this program is run I need it to open and get the last number added and then assign the next number in order. I would like it to allow alphanumerics. So the first number would start with A1 and the go to A2 and so on.
This might sound confusing, please if you have questions let me know. I would appreciate any input.
1st let me say thanks to all of those that have helped me with my previous posts.
Now onto my new problem. :???:
With the program I am writing, I would like to be able to open what I call a running file and have the program add to it. Basically it would work like this. I will ask the user several questions. For this example lets us name, age. After I have the information, I want to be able to open a file that has the same information from other people and then add the new information to the list. And then have the computer assign the person a number based off a number in the opened file. So if the user is the 10th person entering the information, the program would assign him the number 10 and the next person to use the program would get assigned 11.
I would like the file to look something like this.
""""""""""""""""""""""""""""""""""""""""""""""""
Number (assigned) Name Age
** Chris 22
ect....
""""""""""""""""""""""""""""""""""""""""""""""""
Also, I will need to be able to search this file for key words later on and list any information based on that search.
So if I search for the person with the number 15, I will get the following information
Number - Name - Age
Also if I search for anyone with the age of 22, I would recieve all persons of that age in the above format.
Then I need to save the file and exit the program.
Everytime this program is run I need it to open and get the last number added and then assign the next number in order. I would like it to allow alphanumerics. So the first number would start with A1 and the go to A2 and so on.
This might sound confusing, please if you have questions let me know. I would appreciate any input.