新微赢技术网

标题: 请哪位达人分析下c++代码的错误。。能解释下更好 [打印本页]

作者: 孤独的囚鸟    时间: 2009-11-3 04:02
标题: 请哪位达人分析下c++代码的错误。。能解释下更好
程序代码:
#include<iostream>

class Employee
{
public:
    unsigned int getAge() const;
    unsigned int getYearsOfService() const;
    double getSalary() const;
    void setAge(unsigned int tage);
    void setYearsOfService(unsigned int tyearsOfService);
    void setSalary(double tsalary);
    Employee(unsigned int tage);
    ~Employee();
private:
    unsigned int age;
    unsigned int yearsOfService;
    double salary;
}
Employee::Employee(unsigned int tage)
{
    age = tage;

}
Employee::~Employee(){}
unsigned int Employee::getAge() const
{
    return(age);
}
unsigned int Employee::getYearsOfService() const
{
    return(yearsOfService);
}
double Employee::getSalary() const
{
    return(salary);
}
void Employee::setAge(unsigned int tage)
{
    age = tage;
}
void Employee::setYearsOfService(unsigned int tyearsOfService)
{
    yearsOfService = tyear




欢迎光临 新微赢技术网 (http://bbs.weiying.cn/) Powered by Discuz! X3.2