Реферат: Объектно ориентированое програмирование на С
};
void list::add_after(char* s)
{
if (current==NULL)
{
current=new element[1];
current->info=new char[strlen(s)+1];
strcpy(current->info,s);
current->up=current->down=NULL;
first=last=current;
return;
};
if (current==last)
{
last=new element[1];
last->info=new char[strlen(s)+1];
strcpy(last->info,s);
last->down=NULL;
last->up=current;
current->down=last;
current=last;
return;
};
//put in buffer adress down
last->down=current->down;
current->down=new element[1];
current->down->up=current;
current=current->down;
current->down=last->down;