Quantcast
Channel: Storing pointers in std::vector - Stack Overflow
Browsing latest articles
Browse All 2 View Live

Answer by OrenIshShalom for Storing pointers in std::vector

Here is a simple example to show how common is std::vector<A> versus std::vector<A *>. I grepped llvm 6.0.0 since it is considered by many to be a leading standard of CPP development. Here...

View Article



Storing pointers in std::vector

Suppose I have some class A that contains many data members. When I create a vector of this class std::vector<A> vec; and call vec.push_back(A(...));, some times the vector will have to...

View Article
Browsing latest articles
Browse All 2 View Live




Latest Images