This article describes how to create stack based allocators for use with STL containers.
Latest Miscellaneous Articles - Page 2
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.
The article gives an example of false-sharing in multi-threading programming using C++0x std::thread.
You're often required to repeat identical pieces of initialization code in every constructor of a class that declares multiple constructors. That's because unlike a few other programming languages, The C++ programming language doesn't allow a constructor to call another constructor of the same class. Luckily, this problem is about to disappear with the recent approval of a new C++0x feature called delegating constructors which are explained in this C++ tutorial.
If you're building Windows Mobile apps FakeGPS could be the answer to your troubleshooting worries. Learn how to test your GPS applications using FakeGPS.
Jump Lists provide a simple and convenient way for users to open documents and perform common tasks, and Windows 7 provides basic support for Jump Lists with no explicit application development. C++ developers can improve their applications by using the MFC class CJumpList to provide custom jump list items for easier application interaction.
Latest Developer VideosMore...
Latest CodeGuru Developer Columns
Become more proficient on the usage of statements to control the flow of execution through a C++/CLI application.
Just by using a bit of code, you can find virtually any IP address and its "real" name.
Discover how to make your own text editor in Visual Basic.
Have you ever wanted to control your garage door from your smartphone? Here is your chance. Get your hands dirty with an Arduino Garage Door Controller.