I'm having a bit of a problem with a group project. We're supposed to use linked lists in it and I've already created classes for the nodes for the linked lists. The only problem is that I need to make the class point to itself but I'm not sure how to write the accessor and mutator code or how to implement them properly. I'll post the code below. can anyone help?
#ifndef PROCESSEDPAYROLL
#define PROCESSEDPAYROLL
#include "DeptRates.h"
#include "EmployeePayroll.h"
#include <iostream>
using namespace std;
//creation of class ProcessedPayroll
class ProcessedPayroll:public EmployeePayroll: public DeptRates
{
private:
float RegularPay;
float OvertimePay;
float GrossPay;
ProcessedPayroll* ProcssPrll;//pointer to the structure to make it a node in the linked list
public:
ProcessedPayroll();
float getRegularPay();
float getOvertimePay();
float getGrossPay();
ProcessedPayroll* getProcsPrll
void CalculateRegularPay(float, float, float);
void CalculateGrossPay(float, float, float);
void CalculateOvertimeHrs(float, float);
void CalculateOvertimePay(float, float);
void virtual SaveRecord(); //saves record to the file.
void virtual SaveEmployee();
};
#endif