There is a file, a string of unknown length is written in it, how can I write it into a char
array? I tried something, but nothing came of it.
Here I removed the excess from the code, I'm not sure about the double pointer.
char **str; //вот сюда надо записать из файла char ch; FILE *fp; if ((fp = fopen("test.txt","r"))==NULL) { printf("File not found.\n"); } do { ch = getc(fp);//read //тут видимо должен быть чудо-код } while(ch!=EOF); fclose(fp);