#include <iostream>
using namespace std;//设计一个学生类
class CStudent
{public: //公有成员void InputData(){cout << "请输入学号";cin >> sno;cout << "请输入姓名";cin >> sname;cout << "请输入分数";cin >> dscore;}void OutputData();double deverage;private: //私有成员int sno;//学号char sname[10];//姓名double dscore; //分数protected:};inline void CStudent::OutputData()
{cout << "\n学生的数据信息如下:" << endl;cout << "学号:" << sno << endl;cout << "姓名:" << sname << endl;cout << "分数:" << dscore << endl;}int count_func()
{//static int x = 0;int x = 0;return ++x;
}int main()
{CStudent stu1;stu1.InputData();stu1.OutputData();for (int i = 0; i < 5; i++)cout <<"调用计数函数:"<< count_func() << endl;}