TextLine::TextLine(const string &text)
{
char *str, *p;
str = new char[text.size()+1];
strcpy(str, text.c_str());
p=strtok(str, " ,.!?;)");
while(p!=NULL)
{
p=strtok(NULL, " ,.!?;)");
}
delete[] str;
}
Questa è la funzione, essa serve a suddividere una linea di testo in token.Io devo pero farmi ritornare un valore string, ho anche una funsione getText(){string str; //*da implementare*// return str} e non so se posso consatenarle insieme!? Grazie per l'aiuto in anticipo!!!