Allora, il fatto è questo:
il prototipo della funzione l'ho dichiarato così:
ftpstream * operator << (std::string &);
perchè se scrivevo ftpstream operator <<... o ftpstream & operator << .... non povevo ritornare this, che è const ftpstream *
Il problema è che con questo codice se io scrivo così:
ftpstream ciao;
ciao << "1" << "2" << "3";
mi chiama il costruttore di ciao, e poi mi chiama 3 volte il distruttore! dopo aver eseguito l'operatore!
Come posso fare?????