Archive for the ‘erroneous’ Category
If you ever try to define a public custom operator new while keeping the corresponding delete operator private, you’ll end up unable to compile any code that actually invokes the public operator new. The reasoning is quite interesting.
Subclassing templates
Posted on: 09/10/2009
- In: erroneous
- 4 Comments
In this post I will introduce a common problem you are likely to bump into when inheriting from templated base classes.
Checking file signature
Posted on: 27/09/2009
- In: erroneous
- 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 what i was aiming for, I will update the post with an explanation.
Find below the first post, on the topic of file signatures (aka magic numbers).
Recent comments