Tag Archives: c++

Get Started With Boost in 3 Minutes

Boost is simply a collection of C++ libraries that provide lots of fun things to do in C++ without you having to write the code yourself. For example, Boost contains libraries to help you with mathematical calculations, regular expressions, smart pointers and even python integration. Parts of Boost have already been integrated into C++11, but […]

Dynamic Memory in C++ (new and delete)

We looked at dynamic memory in C last week, so let’s compare it with dynamic memory in C++. Allocation In C++, if you want to allocate on the heap rather than the stack, you need to use the new operator. Just like the C equivalents, the new operator returns a void* pointer to the block […]

Download the 10 Minute Guide To Object Oriented Programming

I wrote some posts a while back on the principles of object oriented programming and have collated them into this 10 minute guide as a PDF file that you can download. It covers the main concepts of OOP and also has a simple example of polymorphism in C++. Get your copy here.  

Using errno

Lots of functions in the C standard library will set errno to an error code if something goes wrong, so using errno in your programming can help you pinpoint where problems are occurring and what they might be. errno remains set at the last error code, so bear in mind that: a) if two subsequent […]