// Example program
#include <iostream>
#include <string>
using namespace std;
struct Sentence{
char** words;
int size;
};
struct Text{
Sentence *sentences;
int size;
};
char * add_element(char *massiv, int number){
char* tp = new char[number+1];
for (int i=0; i<number; i++) tp[i] = massiv[i];
delete[] massiv;
return tp;
}
int main()
{
Text text;
char words[] = {'A'};
char* sent[1];
sent[0] = words;
text.sentences->words = sent;
char* word = add_element(text.sentences->words[0], 1);
text.sentences->words[0] = word;
cout << text.sentences->words[0][0];
}