Any tips for my assignment?

Hi there. I have an assignment which is titled : Write an application in C++ for a company to keep track of staff records. Create at least 20 records (staff name, staff ID, position, IC number, date joined, address (city), and contact number – you may add more) in a text file. The application should read the staff records from the text file and insert them into an array of structures.
Can any experts out there help me with this assignment as I am new to C++. Thanks!!!
You need to know how to use ifstreams to read from file. You can make a struct with all the staff information and create an array of that type to store the information.
closed account (48T7M4Gy)
The application should read the staff records from the text file and insert them into an array of structures.


1. Step 1: Plan.
2. Step 2: Make up a text file or use the one you were given.
3. Step 3: Learn how to read a text file and display the data on it.
4. Step 4: Learn how to set up arrays and read the file data into the arrays.

http://www.cplusplus.com/doc/tutorial/files/
http://www.cplusplus.com/doc/tutorial/arrays/
You also need to learnhow to create and use structures:
https://www.programiz.com/cpp-programming/structure
step 5, think about what is next. After you store data in some construct, you invariably want to get it back out. This program is sort of an overly simplistic database, but the ideas remain... you may want to search for a record, and if you did, which pieces of data do you think a user might have in hand to search in order to get the rest of the associated data? Name? ID? Everyone that holds X position title? Maybe they want a sorted list of everyone by name. You don't have to code it, but anticipation of what comes next can help you decide how to store the data now in a way that you can do these things easily later.

Topic archived. No new replies allowed.