Quantcast
Channel: CodeGuru Forums - Visual C++ Programming
Viewing all articles
Browse latest Browse all 3029

Smart pointers

$
0
0
Hi,
I was told that my code will be greatly simplified if I start using smart pointers available in C++11. However, it is kind of hard for me to get the syntax.

In the old way I simply write:

Code:

std::vector<Foo *> m_myVector;
m_myVector.push_back( new Foo( <constructor_parameter_list> ) );

How it will convert using the new syntax?

Thank you.

Viewing all articles
Browse latest Browse all 3029

Latest Images

Trending Articles



Latest Images