Posts RSS Comments RSS 16 Posts and 32 Comments till now

Archive for July, 2007

std::numeric_limits, does it really do what you expect?

Can you see why the code at the bottom is working as expected for integers (integral numbers) but not doubles (or other floating point numbers for that sake)? If not, don’t worry, you are not alone. Continue Reading »

Predicting the future – human extinction and the probability of me finding a date tonight.

There is a 95% chance of human extinction before 11126 AD and what is even worse, the tiny probability of 0.01% for me to find a date tonight. At least if we agree to trust Bayesian statistics. Continue Reading »

Quick toggle between .h and .cpp files

When programming C++ it is a very common need to switch between the .h and .cpp file. There are no built in way to do this in Visual Studio, however it is possible to accomplish! You can either use an expensive helper program, such as Visual Assist or you can do it freely by writing a macro. Continue Reading »