首页 > 资讯 > 顺序表建立学生健康表

顺序表建立学生健康表

                                                                                                                                                                                                                                                                             【    】                  (  、  、  、     、       、       )。            、  、    、  、     。【    】                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    【    】                  (  、  、  、     、       、       )。            、  、    、  、     。【    】                         :1------       2------            3------          4------           5------            6------           (          )7------            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                                                                                                                                                                                                                                                                                    【    】                  (  、  、  、     、       、       )。            、  、    、  、     。【    】                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    【    】                  (  、  、  、     、       、       )。            、  、    、  、     。【    】                         :1------       2------            3------          4------           5------            6------           (          )7------            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]);//           (          )bool 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]);//           (          )bool 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       

相关知识

顺序表建立学生健康表
表字笔顺笔画顺序
居民健康档案的编码后()位表示居民的个人序号,由建档机构根据建档顺序编制。
各个月龄添加辅食顺序表,建议收藏
疫苗接种的顺序与时间表
居民健康档案的编码后第()段表示居民的个人序号,由建档机构根据建档顺序编制。
各个月龄宝宝辅食添加顺序表,建议收藏
辅食添加顺序时间表,让宝宝吃得更健康!
立字笔顺笔画顺序
婴儿辅食添加顺序表

网址: 顺序表建立学生健康表 https://m.trfsz.com/newsview1161914.html