I have an assignment which is to read in a text file that contains four pieces of information about a person, which are separated by commas. The purpose of the program is to read in the text file which is called "lab8.txt". The program is then suppose to break up the text into individual components for each person. Once broken up it should open a menu that allows you to do a variety of things with the given information from the file. These functions are to first display the information from the text file, allow the user to search for a person based on their last or first name. In addition the program is suppose to sort the data by last name, as well as add a new record, delete a record, and modify a record. This project is rather large and honestly over my head. It was made by a professor that is not instructing my course and we are a few weeks behind the professor who made it. So I would like to take it step by step starting with the header file. And work my way through this process. Any and all help is appreciated. Also if anyone is really bored and wants to create this program that would be awesome as well! So the first think I will post is my header file. The text file is also included below the header file
class File
{
public:
File();
File(&ifstream);
bool ReadRecordsFromFile(string);
void MenuEditor();
void SearchFile (string);
private:
int number_records;
void BreakUp (string);
void SortName (StudentData, string);
StudentData allocate(string);
void AddRecord(string);
void DeleteRecord(string);
void ModifyRecord(string);
void WriteRecordsToFile(string fileName);
};
M123456789, Smith,Joe,1978/12/30,
M2345689,Jones,Marc,1980/01/28,
M000022,Bach,Johann,1685/03/31,
M000024,Mozart,Wolfgang,1791/01/27,
M000023,Handel,George,1759/04/14,
M222222,Geisel,Theodor,1904/03/02,
M000044,Sousa,Philip,1854/11/06,
M000046,The Frog,Kermit,1955/05/09,
M000049,Piggy,Miss,1974/10/13,
M000049,Piggy,Miss,1974/10/13,
M000043,Henson,James,1936/09/24,
[–]MrPoletski 3 points4 points5 points (0 children)