#include using namespace std; struct Elem{ string napis; Elem*next; }; int funkcja(Elem*&glowa, int D) { if(glowa==NULL){ return 0; } bool mniejsze=true; Elem*tmppop=NULL; Elem*tmp=glowa; while(true){ if(tmp->napis.size()>=D){ mniejsze=false; return 0; } if(tmp->next==NULL) break; tmppop=tmp; tmp=tmp->next; } if(glowa->next==NULL){ delete glowa; glowa=NULL; return 1; }else if(glowa->next->next==NULL){ delete glowa->next; delete glowa; glowa=NULL; return 2; }else{ delete tmp; tmppop->next=NULL; tmp=glowa; glowa=glowa->next; delete tmp; return 2; } return 0; } int main() { cout << "Hello World!" << endl; return 0; }