?? 5-2-1.cpp
字號:
#include <iostream.h>
#include <string.h>
class Student {
private:
int iNo;
char sName[10];
float fEng,fMath, fCmp;
public :
Student(int no, char *sn, float e, float m, float c)
{
iNo = no;
strcpy(sName, sn);
fEng = e; fMath = m; fCmp = c;
cout<< "姓名:" << sName << " -學生的構造函數(shù)被調用"<<endl;
}
float GetAvg();
float GetTotal();
} ;
void main()
{ Student std1(1001, "zhang", 77, 89, 82);
Student std2(1002, "wang", 87, 92, 78);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -