This post continues and explains the previous erroneous post. In the example from the previous post, our base class has invoked a virtual function during the construction of the object, expecting that the correct function would be called. Why was that an error, you ask ?
Archive for September, 2009
Virtual dispatching within a constructor/destructor
Posted in mechanisms on 30/09/2009 | 5 Comments »
Checking file signature
Posted in erroneous on 27/09/2009 | 2 Comments »
Okay, so here’s how this category is going to work. I will post and explain a few lines of code, with one (or more) defect(s) hidden in them. The defect will not be trivial (at least not intentionally). Your job is to spot and explain the bug(s) – once there’s at least one comment about [...]
Everything about namespaces
Posted in mechanisms on 24/09/2009 | Leave a Comment »
I’ll assume you are already familiar with the concept of namespaces, and the using keyword. So let me try and introduce some of the less common features of the namespace mechanism.
Reference to temporary
Posted in mechanisms on 20/09/2009 | Leave a Comment »
This article will discuss references to temporary objects - a mechanism with a few subtleties.
Designing for testability: factories
Posted in design on 18/09/2009 | 2 Comments »
When we approach the process of designing our software, there are many issues we must address in order to be succesful. One of these issues (and you are free to disagree) is: How will we be able to test (or debug) our hand crafted piece of code? This post will attempt to at least provide [...]
Mutable and volatile
Posted in mechanisms on 16/09/2009 | 2 Comments »
I am a little busy nowadays, so excuse me for posting yet another somehow basic article. However, I still retain the hope that some of you are not familiar enough with at least one of these two keywords in C++.