順序表建立學(xué)生健康表
【 】 ( 、 、 、 、 、 )。 、 、 、 、 ?!尽 俊 ? 【 】 ?。ā ⅰ ?、 、 、 、 ?。??! ?、 、 、 、 ?!尽 俊 。?------ 2------ 3------ 4------ 5------ 6------ ?。ā 。?------ 8----- ?。?include <iostream>#include <fstream>using namespace std;/* * , stuID, name, BirthOfDate, sex(B、G), (A,B,C) */struct birthday // {unsigned short day; unsigned short month; unsigned short year; };struct Sstudent // {char stuID[12]; // www.taodocs.com 【 】 ?。ā ⅰ ?、 、 、 、 ?。! ?、 、 、 、 ?!尽 俊 ? 【 】 ( 、 、 、 、 、 ?。??! ?、 、 、 、 ?!尽 俊 。?------ 2------ 3------ 4------ 5------ 6------ ?。ā 。?------ 8----- ?。?include <iostream>#include <fstream>using namespace std;/* * , stuID, name, BirthOfDate, sex(B、G), (A,B,C) */struct birthday // {unsigned short day; unsigned short month; unsigned short year; };struct Sstudent // {char stuID[12]; // www.taodocs.com
char name[12]; // struct birthday bd; // char sex[4]; // char healthcase[10]; // Sstudent(){} void input(); // void output(); // void operator =(Sstudent s);bool operator < (Sstudent &s);bool operator == (Sstudent s);bool operator > (Sstudent &s); };void Sstudent::input() // {cout<<" ?。?<<endl;cout<<" :";cin>>stuID;cout<<" :";cin>>name;cout<<" :";cin>>sex;cout<<" ( 、 、 ):";cin>>bd.year>>bd.month>>bd.day;cout<<" ( ?。?";cin>>healthcase;cout<<endl;}void Sstudent::output() // {cout<<" : "<<stuID<<endl <<" : "<<name<<endl<<" : "<<sex<<endl<<" : "<<bd.year<<"/"<<bd.month<<"/"<<bd.day<<endl<<" : "<<healthcase<<endl<<endl;}void Sstudent::operator =(Sstudent s){strcpy(stuID,s.stuID);strcpy(name,s.name);strcpy(sex,s.sex);bd.year=s.bd.year;bd.month=s.bd.month;bd.day=s.bd.day;strcpy(healthcase,s.healthcase); www.taodocs.com char name[12]; // struct birthday bd; // char sex[4]; // char healthcase[10]; // Sstudent(){} void input(); // void output(); // void operator =(Sstudent s);bool operator < (Sstudent &s);bool operator == (Sstudent s);bool operator > (Sstudent &s); };void Sstudent::input() // {cout<<" ?。?<<endl;cout<<" :";cin>>stuID;cout<<" :";cin>>name;cout<<" :";cin>>sex;cout<<" ( 、 、 ):";cin>>bd.year>>bd.month>>bd.day;cout<<" ?。ā 。?";cin>>healthcase;cout<<endl;}void Sstudent::output() // {cout<<" : "<<stuID<<endl <<" : "<<name<<endl<<" : "<<sex<<endl<<" : "<<bd.year<<"/"<<bd.month<<"/"<<bd.day<<endl<<" : "<<healthcase<<endl<<endl;}void Sstudent::operator =(Sstudent s){strcpy(stuID,s.stuID);strcpy(name,s.name);strcpy(sex,s.sex);bd.year=s.bd.year;bd.month=s.bd.month;bd.day=s.bd.day;strcpy(healthcase,s.healthcase); www.taodocs.com
}bool Sstudent::operator < (Sstudent &s){ if(strcmp(stuID,s.stuID) == -1) // number s.numberreturn true; elsereturn false;}bool Sstudent::operator == (Sstudent s){if( !strcmp(name,s.name) ) // name s.numberif( !strcmp(stuID,s.stuID) ) // num s.numberreturn true;return false;}bool Sstudent::operator > (Sstudent &s){if(strcmp(stuID,s.stuID) == 1) // number s.numberreturn true; elsereturn false;}class Student{public:Student();Student(int sz);// ~Student(){};// void makeEmpty();// void SetData();// void Search(char ID[12]);// ?。ā 。゜ool Insert(int i,Sstudent s); // void Remove(int i, Sstudent& s);// void Print();// void Write();void ReadInsert(Sstudent s);Student Read();private:Sstudent *stu;int last;int maxSize;}; www.taodocs.com }bool Sstudent::operator < (Sstudent &s){ if(strcmp(stuID,s.stuID) == -1) // number s.numberreturn true; elsereturn false;}bool Sstudent::operator == (Sstudent s){if( !strcmp(name,s.name) ) // name s.numberif( !strcmp(stuID,s.stuID) ) // num s.numberreturn true;return false;}bool Sstudent::operator > (Sstudent &s){if(strcmp(stuID,s.stuID) == 1) // number s.numberreturn true; elsereturn false;}class Student{public:Student();Student(int sz);// ~Student(){};// void makeEmpty();// void SetData();// void Search(char ID[12]);// ?。ā 。゜ool Insert(int i,Sstudent s); // void Remove(int i, Sstudent& s);// void Print();// void Write();void ReadInsert(Sstudent s);Student Read();private:Sstudent *stu;int last;int maxSize;}; www.taodocs.com
相關(guān)知識(shí)
順序表建立學(xué)生健康表
表字筆順筆畫順序
居民健康檔案的編碼后()位表示居民的個(gè)人序號(hào),由建檔機(jī)構(gòu)根據(jù)建檔順序編制。
各個(gè)月齡添加輔食順序表,建議收藏
疫苗接種的順序與時(shí)間表
居民健康檔案的編碼后第()段表示居民的個(gè)人序號(hào),由建檔機(jī)構(gòu)根據(jù)建檔順序編制。
各個(gè)月齡寶寶輔食添加順序表,建議收藏
輔食添加順序時(shí)間表,讓寶寶吃得更健康!
立字筆順筆畫順序
嬰兒輔食添加順序表
網(wǎng)址: 順序表建立學(xué)生健康表 http://www.u1s5d6.cn/newsview1161914.html
推薦資訊
- 1發(fā)朋友圈對(duì)老公徹底失望的心情 12775
- 2BMI體重指數(shù)計(jì)算公式是什么 11235
- 3補(bǔ)腎吃什么 補(bǔ)腎最佳食物推薦 11199
- 4性生活姿勢(shì)有哪些 盤點(diǎn)夫妻性 10425
- 5BMI正常值范圍一般是多少? 10137
- 6在線基礎(chǔ)代謝率(BMR)計(jì)算 9652
- 7一邊做飯一邊躁狂怎么辦 9138
- 8從出汗看健康 出汗透露你的健 9063
- 9早上怎么喝水最健康? 8613
- 10五大原因危害女性健康 如何保 7826