Tuesday, May 26, 2009

C++ - HowTo printf on release version

Ever wanted to know where you are in your code when running a release version? use this

AllocConsole();
freopen("conin$", "r", stdin);
freopen("conout$", "w", stdout);
freopen("conout$", "w", stderr);


and now you can use "printf" to output debug on a simple console.

0 תגובות:

Post a Comment

 
Home | About | Link | Link
Simple Proff Blogger Template Created By Herro | Inspiring By Busy Bee Woo Themes