Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to write to console/log in VC++ in a Metro app?

i am working on vc++ application ,in this application How to write to console/log?

c# ----system.diagnostics.debug.writeline("Hello"); similar to Vc++ ----?

like image 721
Narasimha Avatar asked Oct 07 '22 08:10

Narasimha


1 Answers

A metro style app cannot have a console. You can use OutputDebugString() in a C++/CXX app to display debug text on the Visual Studio Output window, just like System.Diagnostics.Debug.Write does in a managed app. There are not a lot of approved winapi functions but OutputDebugString() is okay. Starting MSDN page is here.

like image 187
Hans Passant Avatar answered Oct 11 '22 15:10

Hans Passant