The Wayback Machine - https://web.archive.org/web/20151214134516/http://www.codeguru.com:80/cpp/misc/samples/basicprogramming/

Latest Basic Programming Articles

C++ Programming: A Better Vector Trim Algorithm With Move Semantics

Vectors are one of the single most useful and most used objects in the STL. They are easy to use, and remove the burden of memory management from the user. It is possible to partially control memory usage by using functions like reserve, but nothing is provided to free up excess memory. Users have come up with ways to trim a vector by hand, but with the advent of the new C++0x and its move semantics, the classic solution of copy-swaping has become excessively expensive. This article seeks to find a better solution.

Latest Developer Videos

More...

Latest CodeGuru Developer Columns

C++ Tips and Tricks

Quirky and yet persistent, C++ is a language that keeps programmers coming back to it. Pick up some new ways to wrangle it into your workflow.

Top White Papers and Webcasts

  • Anthony Christie, the Chief Marketing Officer for Level Communications, is responsible for customer experience, worldwide marketing and product management. In this informative asset, he shares his insights into why a private network connection to cloud-bases applications is the right decision for your enterprise. Download now to find out more.

  • IT leaders today are reinventing their infrastructure to support a mobile workforce and a complex array of connected devices. Against this backdrop of mobility and connectivity, healthcare IT is tasked with meeting compliance challenges in an intricate and transformational regulatory environment. With a host of new data protection regulations and increasingly high settlement fees for data breaches, data security — and endpoint protection — has never been more important to healthcare organizations. …

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date