Advertisement
Guest User

Untitled

a guest
Dec 11th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.42 KB | None | 0 0
  1. char **readText(char **Text,int *Count_sentence){
  2.     int size = 100; //память в text
  3.     char *sentence;
  4.     do{
  5.         sentence = readSentence();
  6.         if (*Count_sentence == size - 3){
  7.             size += 10;
  8.             Text = realloc(Text, size * sizeof(char*));
  9.         }
  10.         Text[*Count_sentence] = sentence;
  11.         (*Count_sentence)++;
  12.     }while(strcmp(sentence,"End!"));
  13.     //return Text;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement