c++ - Iterate shared_ptr<std::vector<T>> -


let's assume have following:

auto vec = std::shared_ptr<std::vector<t>> 

and want loop through vec entities using c++11 range-based loop.

the following works:

for (auto entity: *vec) 

my question there anyway same without using * operator?

no. sensible way dereference pointer dereference operator.


Comments

Popular posts from this blog

Using 'OR' and 'AND' in SQL Server -

c++ - NetBeans Remote Development with additional configuration -

visual studio - TFS will not accept changes I've made to a Java project -