studentrecord4.h

来自「这是数据结构、算法与应用-C++语言描述的代码」· C头文件 代码 · 共 24 行

H
24
字号


#ifndef studentRecord_
#define studentRecord_

using namespace std;

struct studentRecord 
{
   int exam1, exam2, exam3;
   int name;

   operator int() const {return exam1;}
};

ostream& operator<<(ostream& out, const studentRecord& x)
{
   out << x.name << ' ' << x.exam1 << ' ' << x.exam2 
       << ' ' << x.exam3 << endl;
   return out;
}

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?