Why this code works?
QSharedPointer<Client> client = QSharedPointer<Client>(new Client(socket), &QObject::deleteLater);
connect(client.data(), SIGNAL(disconnected(Client*)), this, SLOT(removeClient(Client*)));
But this does not work?
auto client = QSharedPointer<Client>(new Client(socket), &QObject::deleteLater);
connect(client.data(), SIGNAL(disconnected(Client*)), this, SLOT(removeClient(Client*)));
P.S. I'm noobie in C++ (and in English too...)
Aucun commentaire:
Enregistrer un commentaire