⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ex_studentdoc.h

📁 Visual C++应用教程-源代码 本书在复习C++基础知识后
💻 H
字号:
// Ex_StudentDoc.h : interface of the CEx_StudentDoc class
//
/////////////////////////////////////////////////////////////////////////////

#if !defined(AFX_EX_STUDENTDOC_H__AB8B13D6_5426_479C_BB2C_75214FAAB2D4__INCLUDED_)
#define AFX_EX_STUDENTDOC_H__AB8B13D6_5426_479C_BB2C_75214FAAB2D4__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CStudent : public CObject
{
	CString strName;				// 姓名
	CString strNO;					// 学号
	float fScore1, fScore2, fScore3;	// 三门成绩
	float fAverage;					// 平均成绩
	DECLARE_SERIAL(CStudent)
public:
	CStudent() {};
	CStudent(CString name, CString id, float f1, float f2, float f3);
	void Serialize(CArchive &ar);
	void Display(int y, CDC *pDC);	// 在坐标为(0,y)处显示数据
};

class CEx_StudentDoc : public CDocument
{
protected: // create from serialization only
	CEx_StudentDoc();
	DECLARE_DYNCREATE(CEx_StudentDoc)

// Attributes
public:

// Operations
public:
	CObArray m_stuObArray;
	int GetAllRecNum(void);
	CStudent * GetStudentAt(int nIndex);

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CEx_StudentDoc)
	public:
	virtual BOOL OnNewDocument();
	virtual void Serialize(CArchive& ar);
	//}}AFX_VIRTUAL

// Implementation
public:
	virtual ~CEx_StudentDoc();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

protected:

// Generated message map functions
protected:
	//{{AFX_MSG(CEx_StudentDoc)
	afx_msg void OnSturecAdd();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_EX_STUDENTDOC_H__AB8B13D6_5426_479C_BB2C_75214FAAB2D4__INCLUDED_)

⌨️ 快捷键说明

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