#include #define BUFSIZE 80 struct bufer { int size; char mas[BUFSIZE]; }; struct TABL { int size; char str[BUFSIZE]; struct TABL *next; }; struct TABL* create (struct TABL* L, struct bufer buf) { int i; if (L == NULL) { L = new struct TABL[BUFSIZE+2]; L->size = buf.size; for (i = 0; i < buf.size; i++) L->str[i] = buf.mas[i]; L->next = NULL; } else L->next = create (L->next, buf); return L; } int main() { char c; FILE* f1; struct TABL* T; struct bufer buf; f1 = fopen("myprog.txt","r"); c = fgetc(f1); T = NULL; while (c != EOF) { while (c == ' ') c = fgetc(f1); buf.size = 0; int k = 0; while((c != ' ')&&(c != EOF)) { buf.mas[k] = c; buf.size++; printf("%c", buf.mas[k]); k++; c = fgetc(f1); } printf("-%d\n", buf.size); printf("In tabl: "); T = create(T, buf); for (int i = 0; i < T->size; i++) printf("%c", T->str[i]); printf("\n"); T = T->next; } delete T; return 0; }