MRL : blog | news | wiki

July 4th, 2008

ngdebug

This is a quick demo of how to write a debug routine that takes variable arguments and outputs the file and line number it’s being called from. Note that only Microsoft compilers need this, because they don’t support variable argument macros. VS .NET 2005 does support variable argument macros, so just use __VA_ARGS__ instead of this trick if you have VS 2005.

Imhotep theme designed by Chris Lin. Proudly powered by Wordpress.
XHTML | CSS | RSS | Comments RSS