mardi 28 avril 2015

Returning value from shared pointer vector string

I'm trying to implement a return method for a class I want to use smart pointers. I have:

std::shared_ptr<std::vector<std::string>> data;

I want to access its last value with this function:

std::string& rear()
    {

    };

How do I access values with the shared_ptr?

Aucun commentaire:

Enregistrer un commentaire