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

                                                }

                                                if (curr->next==NULL)

                                                { //enter record at the end of the file

                                                            curr->next=this;

                                                            this->priv=curr;

                                                            this->next=NULL;

                                                            student::l_last=this;

                                                            break;

                                                }

                                                curr=curr->next;

                                    }

            }

}

void student::fired()

{

            if (this->priv!=NULL) (this->priv)->next=this->next;

            if (this->next!=NULL) (this->next)->priv=this->priv;

            if (student::l_first==this) student::l_first=this->next;

            if (student::l_last==this) student::l_last=this->priv;

            this->~student();

}

4.2.10.  student_operators.h

ifstream& student::operator >>(ifstream& fin)

{

            char* buffer[6];

            int* mark;

            int size;

            for (int i=0; i<6; i++)

            {

                        if ((i!=3)&&(i!=4)) buffer[i] = new char [30];

                        else buffer[i] = new char [6];

                        fin.getline(buffer[i],size_info(buffer[i]),' ');

            }

            size=size_info(buffer[5]);

            buffer[5][size]='0';

            size++;

            buffer[5][size]='\0';

            mark = new int [size];

            for (i=0; i<size; i++)

                        mark[i] = (int)buffer[5][i]-(int)'0';

            this->new_surname(buffer[0],0);

            this->new_name(buffer[1],0);

            this->new_sec_name(buffer[2]);