Virtual dispatching within a constructor/destructor
September 30th, 2009 § 5 Comments
This post continues and explains the previous 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 ?
Checking file signature
September 27th, 2009 § 2 Comments
Find below a post on the topic of file signatures, also known as Magic Numbers. The provided code snippet contains an error for the reader to discover and point out.
Everything about namespaces
September 24th, 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
September 20th, 2009 § 2 Comments
This article will discuss references to temporary objects - a mechanism with a few subtleties.
Designing for testability: factories
September 18th, 2009 § 2 Comments
When we approach the process of designing our software, there are many issues we must address in order to be successful. 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 one way of writing code that is a little easier to debug and test, by making use of the factory design pattern.