?? hstudatabase.h
字號:
//////////////////////////////////////////////////
// the student system's database
// hStuDataBase.h
#ifndef _STUDATABASE_H
#define _STUDATABASE_H
#include "hStudent.h"
#define MAX_STU 1000
class CStuDataBase
{
public: //constructor and destructor
CStuDataBase();
virtual ~CStuDataBase();
public: //Interfaces: member functions
void Initialize(char* pszDataBaseName = "C:\\StuDataBase.dat");
bool AppendRecord(CStudent* pStudent);
void Refresh();
bool UpdateRecord(CStudent* pStudent,int iID);
bool DeleteRecord(char* pszStuName);
bool DeleteRecord(int iID);
bool IsEmpty();
bool IsFull();
CStudent* FindRecord(char* pszStuName);
CStudent* FindRecord(int iStuID);
CStudent* FirstRecord();
CStudent* LastRecord();
CStudent* GetRecord(int iIndex);
bool PostToDataBase();
int GetRecordCount();
protected:
int GetStuIndex(int iID);
int GetStuIndex(char* pszStuName);
protected:
CStudent m_stuObject[MAX_STU];
char* m_pszDataBaseName;
int m_RecordCount;
FILE* m_pfWriteFile;
FILE* m_pfReadFile;
//bool m_Connected;
};
#endif // end _STUDATABAAE_H
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -