?? people.cpp
字號:
// people.cpp,類CPople的實(shí)現(xiàn)
#include "people.h"
#include <string.h>
#include <iostream.h>
int CPeople::GetAge()
{
return m_nAge;
}
void CPeople::SetAge( int age )
{
if(age<=0)
cout<< "設(shè)置的年齡不合法"<<endl;
else
m_nAge = age;
}
float CPeople::GetSalary()
{
return m_fSalary;
}
void CPeople::SetSalary( float num )
{
if(num<0)
cout<<"設(shè)置的薪水?dāng)?shù)目不合法"<<endl;
else
m_fSalary = num;
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -