Are there any advantages of it, or its bad idea? Why its bad?
std::vector<object> * vec;
I found similar question, but it did not explain why should we use/not use it, thats why Im asking.
C++ Any benifits using pointer to vector of pointers?
Only reason that I know there are:
Pointer may be null
std::vector<object> * vec == nullptr;
if (vec == nullptr) vec = new std::vector<object>(size);
size is 8
of pointer on stack is 8, and vector has 3 pointers on stack so 24
Any other reasons?