Регистрация
23 Янв 2013
Сообщения
136
Репутация
0
Спасибо
1
Монет
0
Объясните пожалуйста, в чем заключается проблема?

#include

using namespace std;

class Employee {
public:
Employee(int Age, int Salary, int YoF);
`Employee();
int GetAge();
int GetSalary();
int GetYoF();
void SetAge(int Age);
void SetSalary(int Salary);
void SetYoF(int YoF);
private:
int ItsSalary;
int ItsAge;
int ItsYoF;
};
Employee::Employee(int Age, int Salary, int YoF)
{
ItsAge = Age;
ItsSalary = Salary;
ItsYoF = YoF;
}
Employee::Employee() {}
Employee::SetYoF(int YoF)
{
ItsYoF = YoF;
}
Employee::SetSalary(int Salary)
{
ItsSalary = Salary;
}
Employee::SetAge(Int Age)
{
ItsAge = Age;
}

Employee::GetAge()
{
return(ItsAge);
}
Employee::GetSalary()
{
return(ItsSalary);
}
Employee::GetYoF()
{
return(ItsYoF);
}
int main()
{

Nastya.SetAge(16);
Nastya.SetSalary(50000);
Nastya.SetYoF(2);
cout << Nastya.GetAge() << " " << Nastya.GetSalary() << " " << Nastya.GetYoF() << endl;
return 0;
}
//otvet.imgsmail.ru/download/28421950_1209c6ea573089dde0100d07bd483926_800.png
 
Назад
Сверху