mercredi 26 avril 2017

shared_ptr in C++

I have the following struct:

struct person
    {
        size_t size_ids{};
        std::shared_ptr<char> ptr{};
        std::vector<std::pair<std::shared_ptr<char>, size_t>> zoo{};
    };

Do I need copy constructor or destructor for this struct?

I'm getting delete scalar error.

Aucun commentaire:

Enregistrer un commentaire