struntz
Feb 12th, 2001, 08:07 PM
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:
#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;
};
here is the .cpp file with the implemnation of the class methods:
#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;
}
and if u want the full list of errors, i'll post it in the next message! :D
thanks for listening
i am getting these compiler errors!
here is my .hpp file with the class interface:
#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;
};
here is the .cpp file with the implemnation of the class methods:
#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;
}
and if u want the full list of errors, i'll post it in the next message! :D
thanks for listening