首页 > 编程语言 >C++:OutputDebugString作用(以VS2019为演示例子)

C++:OutputDebugString作用(以VS2019为演示例子)

时间:2022-12-29 15:33:21浏览次数:44  
标签:输出 窗口 cout VS2019 C++ OutputDebugString include 调试


上最简单的代码:

#include <iostream>
#include <Windows.h>
using namespace std;
int main()
{
OutputDebugString(L"输出调DD试信息123");
cout << "Hello World!\n";
}

这个代码就是在控制台输出HelloWorld;

然后OutputDebugString的东西,是输出在调试窗口中;

运行结果:

 

C++:OutputDebugString作用(以VS2019为演示例子)_Windows

 

所以OutputDebugString作用就是类似于printf/cout/print  不过是输出在调试窗口界面当中,相信大家了解了,比较简单。

 

标签:输出,窗口,cout,VS2019,C++,OutputDebugString,include,调试
From: https://blog.51cto.com/u_15906863/5977838

相关文章