当前位置:网站首页>Using printf in MFC
Using printf in MFC
2022-04-23 06:43:00 【~Ha】
Step one :
Add the following code to the dialog initialization function OnInitDialog() in
AllocConsole();// The console debugging window opens
freopen("CONOUT$", "w", stdout);// Enable Chinese console output support
Step two :
Add the following code to the exit function
FreeConsole(); // Release console resources
If you use the default cross in the upper right corner, exit the interface , You can add the following code directly
void CMFCprintfDlg::OnClose()
{
// TODO: Add message handler code and / Or call the default value
FreeConsole(); // Release console resources
exit(0);
CDialogEx::OnClose();
}
Be careful :
The function used for printing is C Standard output function of language printf, stay vs If you use printf Still need to be in Engineering properties -> Configuration properties ->C/C++ -> Preprocessor definition Add **_CRT_SECURE_NO_WARNINGS**
版权声明
本文为[~Ha]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230548244798.html
边栏推荐
- [UDS unified diagnostic service] II. Network layer protocol (1) - overview and functions of network layer
- 客户端软件增量更新
- C语言的浪漫
- Notes on advanced points of C language 5
- Uniapp encapsulates request
- TP download folder, compress folder and download
- gcc ,g++,gdb的安装
- FOC电机库 定点PID代码分析
- 函数的调用过程
- [opencv] use filestorage to read and write eigenvectors
猜你喜欢

MOS管特性和导通过程

基于VGG卷积神经网络的图像识别代码实现

Programmers can also write novels
VHDL-任意分频器(50%占空比)
![[UDS unified diagnostic service] IV. typical diagnostic service (5) - function / component test function unit (routine function unit 0x31)](/img/98/becd691d3d46f74f7666f5cb323eaf.png)
[UDS unified diagnostic service] IV. typical diagnostic service (5) - function / component test function unit (routine function unit 0x31)

函数的调用过程

For() loop parameter call order

Eigen 学习总结
![[UDS unified diagnostic service] III. application layer protocol (1)](/img/e7/813e29a30e08eb92ccc836743be9aa.png)
[UDS unified diagnostic service] III. application layer protocol (1)

clion安装教程
随机推荐
Eigen 库常用基本用法 备忘
【学习一下】HF-Net 训练
Opencv uses genericindex for KNN search
非参数化相机畸变模型简介
【UDS统一诊断服务】四、诊断典型服务(5)— 功能/元件测试功能单元(例行程序功能单元0x31)
【UDS统一诊断服务】三、应用层协议(1)
基于VGG卷积神经网络的图像识别代码实现
基于SSD的物体检测案例实现
WMI技术介绍和应用
PN结、二极管原理详解与应用
类的继承与派生
【OpenCV】使用 FileStorage 读写 Eigen 向量
Introduction to nonparametric camera distortion model
使用TransmittableThreadLocal实现参数跨线程传递
死区时间的分析与设置
Call procedure of function
Make your own small program
[UDS unified diagnosis service] i. diagnosis overview (3) - ISO 15765 architecture
[UDS unified diagnosis service] i. diagnosis overview (1) - diagnosis overview
Notes on advanced points of C language 4