Calling specific lines from a text file and storing them in an variable :     #include <iostream>
    #include <string>
    #include <vector>
    #include <fstream>
    
    #define ORGANISATIONALRECORDSFILE "organisation.txt"
    #define HRRECORDSFILE "HR_records.txt"
    #define PAYROLLRECORDSFILE "payroll_records.txt"
    
    using namespace std;
    
    
    class OrganisationRecord
    {
    private:
    public:
    	string name;
    	string occupation;
    	string department;
    };
    
    class HRRecord
    {
    private:
    public:
    	string address;
    	string phonenumber;
    	string ninumber;
    };
    
    class PayrollRecord
    {
    private:
    public:
    	string ninumber;
    	double salary;
    };
    
    class PayrollProcessing
    {
    private:
    	ifstream inputfile;
    	ofstream outputfile;
    	vector<OrganisationRecord> OrganisationRecords;
    	vector<HRRecord> HRRecords;
    	vector<PayrollRecord> PayrollRecords;
    public:
    	void loadOrganisationRecords(string filename);
    	void loadHRRecords(string filename);
    	void loadPayrollRecords(string filename);
    	void displayEmployeeOfSalaryGTE(double salary);
    	//GTE = greater than or equal to
    };
    
    void PayrollProcessing::loadOrganisationRecords(string filename)
    {
    	inputfile.open(ORGANISATIONALRECORDSFILE);
    	
    	if (!inputfile)
    	{
    		cout << "the organisation records file does not exist" << endl;
    		return;
    	}
    
    		OrganisationRecord _organisationrecord;
    		int employeenumber;
    	
    		
    		while (inputfile >> employeenumber)
    		{	
    			while (inputfile >> _organisationrecord.name)
    			{
    				cout << _organisationrecord.name;
    				//cout << _organisationrecord.occupation;
    				//cout << _organisationrecord.department <<endl;
    			}
    			
    			OrganisationRecords.push_back(_organisationrecord);
    		}
    	
    }
    
    
    
    int main(void)
    {
    	PayrollProcessing database1;
    	database1.loadOrganisationRecords(ORGANISATIONALRECORDSFILE);
    
    	return 0;
    }

i'd like to show the employee number, name, occupation, and department of employees from a text file called "organisation.txt", and save them in the variables declared in the class "organisation record". the file is as follows:

0001 
Stephen Jones 
Sales Clerk 
Sales
0002 
John Smith 
Programmer 
OS Development
0003 
Fred Blogs 
Project Manager 
Outsourcing

