I am working on a vC ++ application, in this application How to write to the console / log?
C # ---- system.diagnostics.debug.writeline ("Hello"); similar to VC ++ ----?
A metro style app cannot have a console. You can use OutputDebugString () in a C ++ / CXX application to display debug text in the Visual Studio output window, as well as in System.Diagnostics.Debug.Write in a managed application. There are not many approved winapi functions, but OutputDebugString () is fine. Starting from the MSDN page here .
if you are creating a GUI application, you can enable the console yourself.
AllocConsole(); freopen("CONOUT$", "w+t", stdout);
and then you can run simple diagnostic messages std :: cout or printf.