DS9596 0 Junior Poster in Training

I did some don't know how to read into the vector, need help on this assignment:

Rich Software Inc. has hired you for an internship position to create new payroll
software for their employees. Your goal is to create a program that reads the
newdata.txt file with their salaries. After that, the user can select from a 4 choice menu
that handles the user’s choices as descried in the details below. The program should
display the menu until the user selects the menu option quit.

Add the newdata.txt file inside your project. Your program must be able to read
any number of salaries from the text file, as the company will add more salaries into the
file. Only the data format remains the same.
Additionally, it is always important to consider a situation if the data file is not found.
That means your program should display this error: ”Sorry, the data file is not found.”
and must terminate immediately.
Step 3. Write the source code according to your pseudo code and the following project
1. Create the first for loop to read the data from the data file into a vector.
2. Once the salary data has been read into the vector, display a menu with 4
choices to the user as follows below. This needs to be setup as a do while and
repeat the program until the user selects the menu choice 4 (Quit). Please select 1, 2, 3, or 4:
Search salary, Enter 1
Generate stats file, Enter 2
Print salaries, Enter 3
Quit, Enter 4
Then set up a switch statement with these cases to handle the user’s selection.
3. If the user selects the menu choice 1, ask the user for a salary, then use a for
loop to search for the exact match inside your vector and display result message
if the match is found : “Matching salary found” and if the match is not found
display: “The salary you entered is not found”

This is all I have right now, I will try to do a little more but I need a lot of help please:

#include <iostream>
#include <cmath>
#include <iomanip>
using namespace std;

int main()
    int choice;

    int sum, maxNumber;
    long initialFactorial, factorialTotal;
    double exponent, exponentialTotal;

    const int Search_Salary = 1,
        Generate_StatsFile = 2,
        Print_salaries = 3,
        Quit = 4;
        cin >> choice;

        while (choice < Search_Salary || choice > Quit)
            cout << "Please enter a valid menu choice: ";
            cin >> choice;

        if (choice != Quit)
            switch (choice)
            case 1: Search_Salary;
            case 2; Generate_StatsFile;
            case 2 Print_salaries;
            default: cout << "Invalid input. Please re-enter." << endl;
    } while (choice != Quit);

} while (choice != Quit);
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.