<windows.h>
inline void debugout(const char* fmt, ...) { char buf[512]; try{ va_list ap; va_start(ap,fmt); _vsnprintf(buf,sizeof(buf)-1,fmt,ap); va_end(ap); OutputDebugString(buf); } catch(...) { OutputDebugString("exception in construct debug message "); } }