Hello everyone again, i still can't figure out this problem!
i am getting these compiler errors!
here is my .hpp file with the class interface:
here is the .cpp file with the implemnation of the class methods:Code:#include <iostream.h> class Employee { public: void SetAge(int EAge); void SetyearsOfService(int yOf); void SetSalary(int Money); int GetAge(); int GetyearsOfservice(); int GetSalary(); private: int age; int yearsOfservice; int Salary; };
and if u want the full list of errors, i'll post it in the next message!Code:#include "Employee.hpp" //function implamenation (can't spell) :P void Cat::SetAge(int EAge) { age = EAge; } // void Cat::SetyearsOfService(int yOf) { yearsOfservice = yOf; // } void Cat::SetSalary(int Money) // { Salary = Money; } int Cat::GetAge() { return age; } // int Cat::GetyearsOfservice() // { return yearsOfservice; } int Cat::GetSalary() { return Salary; } int main() { Employee Cory; Cory.SetAge(15); Cory.SetSalary(100000); Cory.GetyearsOfservice(4); cout << Cory.GetAge << endl; cout << Cory.GetSalary << endl; cout << Cory.GetyearsOfservice << endl; return 0; }
thanks for listening





Reply With Quote