简体   繁体   English

如何在Metro应用程序中使用C ++在Visual Studio 11中打印到控制台/登录?

[英]How to print to console/log in Visual Studio 11 in C++ in a Metro app?

I am attempting to figure out how to print to the debugger console/log in a Visual Studio 11 C++ Metro app. 我试图弄清楚如何在Visual Studio 11 C ++ Metro应用程序中打印到调试器控制台/日志。 I have tried a number of methods to print to the log in a C++ Metro application (cout, Windows.System.Diagnostics, the documentation on MSDN and the Metro development site). 我已经尝试了许多方法来打印到C ++ Metro应用程序中的日志(cout,Windows.System.Diagnostics,MSDN和Metro开发站点上的文档)。

How do I print to the console? 如何打印到控制台?

OutputDebugString : OutputDebugString

Sends a string to the debugger for display. 将字符串发送到调试器以供显示。

Some of the Windows API is usable from a Metro style app, including this function. 某些Windows API可以从Metro风格的应用程序中使用,包括此功能。 You can find a list of other diagnostic-related Windows API functions available from Metro style apps on the Windows Dev Center . 您可以在Windows开发人员中心找到Metro风格应用程序提供的其他与诊断相关的Windows API函数的列表。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM