C++ Programming

Virtual Destructors

Interview questions often ask about virtual destructors and why they are needed. It’s one of those funny things about C++ that unless you have specifically been shown, you just might not realise you need to know. So why do you need a virtual destructor? Essentially, you need a virtual destructor to make sure that ALL…

C++11 Auto Keyword

This is just a short post to illustrate the use of the auto keyword. It’s something really simple from the latest standard that you can use in your programs and it will save you typing time 🙂 . So, the auto keyword has always been around, but it was pretty much redundant. ‘auto’ was the…

A C++11 Threads Tutorial

Last week we created a simple program using the pthreads library. This week I’ve “translated” that program into the C++11 threads version, so you can see how it compares. I say compares, but on linux, using GCC, the C++11 thread library is basically a wrapper for pthreads anyway, so although you are using native C++…

Function Templates In C++

We looked at a very straightforward class template last time, which should have given you the confidence to get started in creating your own template classes. Now, to round off this introduction to C++ templates, we’ll just have a quick look at function templates, and talk a little more about the workings behind template source…

C++ Templates Made Easy

Templates. Groan. With their godawful syntax and impressive verbosity it’s no wonder we screw our faces up in distaste when we see them in code. ESPECIALLY when we’re debugging that code. Oh my. It’s enough to make you wish you were writing the software for musical birthday cards instead (does anyone actually do that?). Anyway,…

| | |

make: Nothing to be done for ‘all’ – Eclipse Error Solved

I’ve seen this odd error several times over the years, almost always after first importing a new project into Eclipse-CDT. After import, when you try to build your project, it just returns the message make: Nothing to be done for all in the console. And then, once you’ve got the error, nothing you do will kick your…