Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Size of vector
Buller last edited by
I have declared
but when I try to find the number of elements by calling
it leads to a crash, presumably because no memory is not yet allocated for m_albums. What is the correct way out of this, so that I can call
even before adding any elements to the the vector?
C++ Basics - you forgot to initialize your shared_ptr.
But why to use a shared_ptr in the first place here?