You are here |
cppstories.com | ||
| | | |
www.cppstories.com
|
|
| | | | What do you do when the code for a variable initialization is complicated? Do you move it to another method or write inside the current scope? In this blog post, I'd like to present a trick that allows computing a value for a variable, even a const variable, with a compact notation. | |
| | | |
www.cppstories.com
|
|
| | | | Let's say we have the following code: LegacyList* pMyList = new LegacyList(); ... pMyList->ReleaseElements(); delete pMyList; In order to fully delete an object we need to do some additional action. How to make it more C++11? How to use unique_ptr or shared_ptr here? Intro We all know that smart pointers are really nice things and we should be using them instead of raw new and delete. | |
| | | |
www.bfilipek.com
|
|
| | | | What do you do when the code for a variable initialization is complicated? Do you move it to another method or write inside the current scope? In this blog post, I'd like to present a trick that allows computing a value for a variable, even a const variable, with a compact notation. | |
| | | |
isocpp.org
|
|
| |