Cross-platform GUI application console for debug messages C++ -


i programming game in c++. want print debugging messages within code using std::cout, gui application there no console print default. have tried running cmd this:

start debug/hydro.exe 

but no avail.

on windows 8 x86_64 using visual studio 2012 win32 project, following code achieves looking for:

#include <windows.h> ... allocconsole(); freopen("conin$", "r",stdin); freopen("conout$", "w",stdout); freopen("conout$", "w",stderr); 

however, believe not cross-platform (do correct me if wrong!) , application work on linux , mac os x.

is there cross-platform solution this? of course, simpler better!

i'm not aware of product in linux world - expected start code shell, , output appears in shell window.

wrapping should help:

#ifdef _win32 // windows-only code here #endif 

when outside of windows, code not compiled, when inside of windows code compiled!


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -