?? list.h
字號(hào):
/////////////////////////////////////////////////////////////////////
///////////// List.h: 類的所有成員都在頭文件里聲明 //////////////////
/////////////////////////////////////////////////////////////////////
#include <iostream.h> // cin 及 cout
#include <malloc.h> // 用到申請(qǐng)內(nèi)存函數(shù) malloc() 和釋放內(nèi)存函數(shù) free()
#include <string.h> // 字符串處理
#include <stdio.h> // 文件操作(讀文件)
#include <stdlib.h> // system("cls")
struct address /*家庭地址*/
{
char city[10]; /*城市*/
char town[10]; /*縣城*/
char village[10]; /*鄉(xiāng)鎮(zhèn)*/
};
struct telephone /*聯(lián)系方式*/
{
char SJ[50]; /*手機(jī)*/
char JD[30]; /*家庭電話*/
char XD[30]; /*學(xué)校電話*/
};
struct person /*個(gè)人信息*/
{
char name[20]; /*名字*/
char sex[10] ; /*性別*/
char MZ[16]; /*民族*/
char GJ[17]; /*國(guó)籍*/
char XL[19]; /*學(xué)歷*/
};
struct score //成績(jī)
{
char num[20]; //學(xué)號(hào)
char english[20];
char chinese[20];
char math[20];
char physics[20];
};
typedef struct linknode //定義節(jié)點(diǎn)的類型
{
char address[100]; //地址
char birthday[100]; //出生日期
struct score sc; //成績(jī)
struct person pe; //個(gè)人信息
struct telephone te; //聯(lián)系方式
bool flag;
struct linknode* next;
}nodetype;
class List
{
nodetype* head;
public:
List();
List::~List();
linknode* creatlist(int); //創(chuàng)建鏈表
int listlen(); //返回鏈表長(zhǎng)度
nodetype* findnode(int); //通過查找序號(hào)返回節(jié)點(diǎn)的指針
nodetype* find(char c[]); //通過查找姓名返回節(jié)點(diǎn)的指針
int find2(char c[]); //通過查找姓名返回節(jié)點(diǎn)的序號(hào)
nodetype* insnode(int); //插入節(jié)點(diǎn)
void delnode(int); //刪除節(jié)點(diǎn)
nodetype* load(); //初始化:從外部讀入數(shù)據(jù)
void readstr(FILE *f,char *string); //讀行函數(shù)
bool check(char *a, char *b); //對(duì)比兩個(gè)字符串是否相等
void help(); //顯示幫助菜單
void editperson(nodetype*); //編輯個(gè)人說明
void editscore(nodetype*); //編輯學(xué)科成績(jī)
void edittelephone(nodetype*); //編輯聯(lián)系方式
void dispname(); //顯示所有學(xué)生姓名
void dispnode(nodetype* p); //顯示一個(gè)學(xué)生的所有信息
void dispperson(nodetype*); //顯示一個(gè)學(xué)生的個(gè)人說明
void dispscore(nodetype*); //顯示一個(gè)學(xué)生的學(xué)科成績(jī)
void disptelephone(nodetype*); //顯示一個(gè)學(xué)生的聯(lián)系方式
};
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -