I know there are other ways to do this. But I decide to experiment this:
unique_ptr<int> pi; pi = std::move(new int);
When I compile this code, the compiler gives an error. why?
Aucun commentaire:
Enregistrer un commentaire