example1-13.cpp
来自「关于书籍《Borland c++Builder工程实践》的源代码」· C++ 代码 · 共 13 行
CPP
13 行
#include <iostream.h>
#include <math.h>
#include "Tstudent.h" //其中包含了类Tstudent以及定义的成员函数
void main()
{
Tstudent student; //声明对象,计算机开始为其分配内存,并初始化对象
student.set_id(2001);
student.set_score(80);
cout<<"The student id is :"<< student.get_id()<<endl;
cout<<"The student score is :"<< student.get_score()<<endl;
return;//在应用程序返回前,计算机删除声明的对象
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?