Linked lists help

I am supposed to read in data from a file, create a linked list, and be able to traverse it. I feel like I have the first part of the code correct but I get a segmentation fault when I try and run the program and the pgm4.rpt file is empty when I open it.

here is the original assignment:

Write a complete C++ program that creates and queries a linked list of people who have served as United States presidents and/or vice presidents. Name your program file pgm4.cpp. Your program should do the following:
1. Define a struct called PublicOfficial to hold the following data about each president or vice president.
Name
State of birth
Office held (1 = President; 2 = Vice President; 3 = both President and Vice President
President Order (a number from 1 - 44 indicating whether he was the 1st, 2nd, 3rd, etc.)
Year first term as President began
Year last term as President ended
Vice President Order (a number from 1 - 44 indicating whether he was the 1st, 2nd, 3rd, etc.)
Year first term as Vice President began
Year last term as Vice President ended
Pointer to the next PublicOfficial in the list

2. In the main function, declare a pointer to serve as the head of a linked list of PublicOfficial structs. Also declare an ofstream variable and open a report file (pgm4.rpt) for writing out the results of queries about the data in the linked list.

3. Call a function named buildList, passing the head pointer by reference. This function will handle reading in all of the data from the file pgm4.dat and storing it in a linked list. First create the ifstream variable, open the input file and check for the success of that operation. Then read in the data for each public official until you reach the end of the file. For each person in the data file:
- Dynamically create a PublicOfficial node to store that person's data.
- Read in the person's Name, State of birth and Office held code. If the Office held code is 1, read in the next three lines and store the data in the President fields. Set the Vice President fields to zero. If the code is 2, read in the next three lines and store the data in the Vice President fields, setting the President fields to zero. If the code is 3 there will be six lines of data to read in, three with the President data followed by three with the Vice President data.
- Call a function named addOfficial to add the new official to the end of the linked list. Pass the pointer to the head of the list and the pointer to the new official to this function.
- Close the input file. All queries should be done using the linked list created from the data in this file.

4. Create a loop in the main function to get the user's selection from the menu of options shown below.

President/Vice President Queries
1. Presidents
2. Vice presidents
3. All who served in both offices
4. Presidents serving in 1700s
5. Presidents serving in 1800s
6. Presidents serving in 1900s
7. Presidents serving in 2000s
8. Presidents from a given state
9. Presidents serving less than full term
10. Exit program

Also, once you get that worked out, you'll find your loop control is going to not work quite right. If you're committed to using eof( ) test for the loop, you should (attempt to )read in a name before first entering the loop, and read name at the end of the loop (as yo do). That read at end of loop must be stored as the official's name when you start the next iteration. Kinda like: