I am coming from C, completely unfamiliar with C++.
From other posts I have read, the gist seems to be: shared pointer allows sharing of "ownership".
My questions are:
- what is ownership? Does it merely have to do with garbage collection?
- what are other differences between shared_ptr and a raw pointer?
- is there a way to convert shared_ptr of a specific type to a generic pointer type? ( the only generic pointer type I know is void*, but I cannot seem to cast shared_ptr to a void* )
Aucun commentaire:
Enregistrer un commentaire