This section of the archives stores flipcode's complete Developer Toolbox collection, featuring a variety of mini-articles and source code contributions from our readers.

 

  Debug Output
  Submitted by



Here is a snippet of code that I use frequently. I don't remember where it originated from, so I can't really claim credit. Its useful for logging messages to whatever output device (video, printer, file, ..) you need..

Download Associated File: debugoutput.cpp (359 bytes)


// COTD Entry submitted by Zach Bonham [zbonham@flash.net]

//: wrapper for logging messages to output device
//:

bool debugout(const char *msg, ...) {

va_list argList; char buffer[512] = { 0 };

va_start(argList, msg);

vsprintf(buffer, msg, argList);

va_end(argList);

OutputDebugString(buffer); OutputDebugString("\n");

return false;

}


The zip file viewer built into the Developer Toolbox made use of the zlib library, as well as the zlibdll source additions.

 

Copyright 1999-2008 (C) FLIPCODE.COM and/or the original content author(s). All rights reserved.
Please read our Terms, Conditions, and Privacy information.