?? student.cpp
字號:
//student.cpp
#include<iostream.h>
#include<string.h>
#include"student.h"
student::student(char *s,int t)
{
name=new char[strlen(s)+1];
strcpy(name,s);
score=t;
}
student::student(student &p)
{
name=new char[strlen(p.name)+1];
score=p.score;
}
student::~student()
{
delete[]name;
}
void student::display(void)
{
cout<<"姓名:"<<name<<" 成績:"<<score<<endl;
}
int student::get_s(void)
{
return(score);
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -