Классы, их инициализация с помощью конструктора и инициализатора, перегрузка, страница 8

            int new_name (char* , int);

            int new_surname (char* k, int);

            int new_sec_name (char* k, int);

            int new_group (char*);

            void new_marks (int*, int);

            void new_gradute (int);

            void new_accession (int);

            //full info initialisation: ÔÈÎ, year of accession, academical group, marks.

            student(char*,char*,char*,int,char*,int*);

            ~student();

            //let's make some operators

};

4.2.8.  student_new_info.h

//                                  **** *   * ***** **** ***  *   *

//                                  *          **  *   *   *       *  *  * *

//                                  **** * * *   *   **** ***    * 

//                                  *          *  **   *   *       * *    * 

//                                  **** *   *   *   **** *  *   * 

student* student::l_first=NULL;

student* student::l_last=NULL;

int student::study_time=6;

int student::new_name (char* k, int mode=1)

{

            if ((this->surname==NULL)||(this->name==NULL)||(this->sec_name==NULL)) return 1;

            this->name=(char*) malloc (size_info(k));

            strcpy(this->name,k);

            if (mode) this->sort();

            return 0;

}

int student::new_surname (char* k,int mode=1)

{

            if ((this->surname==NULL)||(this->name==NULL)||(this->sec_name==NULL)) return 1;

            this->surname=(char*) malloc (size_info(k));

            strcpy(this->surname,k);

            if (mode) this->sort();

            return 0;

}

int student::new_sec_name (char* k,int mode=1)

{

            if ((this->surname==NULL)||(this->name==NULL)||(this->sec_name==NULL)) return 1;

            this->sec_name=(char*) malloc (size_info(k));

            strcpy(this->sec_name,k);

            if (mode) this->sort();

            return 0;