C++ types Flashcards
1
Q
what is a std::shared_ptr?
A
A pointer that has (possibly shared) ownership of a n object. If the (last) shared pointer is deleted or goes out of scope, so is the object
2
Q
should you use const std::string or const char*?
A
const char*, because it will implicitly be converted to const std::string if needed