Simple WinAPI Window Sample in C++
So to make the title true, this is the code: It’s very simple, and straight to the point. If you create a Win32 Project in Visual Studio (an empty one), add an main.cpp source file and then paste this code into it – it should compile without problems. The program runs with a very basic […]
Template definition and declaration separation
One of the more annoying things about templates is their requirement of one source file per object definition. You cannot have separate declaration in an header and a definition in separate source file. At the time of template usage ALL its definition must be known. But there is a neat trick I found while reading […]
Template dynamic casting… or better trust your time-proofed code
While writing my little API framework I run into a rather strange problem – my smart pointer code started to throw null pointer exception. It only did that when there was an attempt to assign a null pointer to it (that should never happen).