当前位置:网站首页>Qt Cmake 纯C 代码调用系统控制台输入scanf 及 中文输出乱码
Qt Cmake 纯C 代码调用系统控制台输入scanf 及 中文输出乱码
2022-06-25 23:12:00 【NIWODIY】
Qt Cmake 纯C 代码调用系统控制台输入scanf 及 中文输出乱码
2020-11-20 15:57:19
系统控制台输出
当用输入功能时,Qt自带控制台。
调用系统控制台的方法,点击左侧 “项目” 图标,出现构建和运行界面,选择“运行”选项,勾选 “在终端中运行(Run in terminal)”即可。
中文输出乱码
在CMakeLists.txt 中添加如下代码
#dubug -g 调试 GBK 中文
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -fexec-charset=GBK")

边栏推荐
- 认识map
- Establish a j-link GDB cross debugging environment for Px4
- Dynamic verification code
- ciscn_ 2019_ en_ two
- C IO stream (I) basic concept_ Basic definition
- 1-10vmware builds customized network architecture
- . user. PHP website installation problems caused by INI files
- Web学习之TypeScript
- C#使用MySql进行操作
- Stream data
猜你喜欢

Mining pit record of modified field information in Dameng database

从查询数据库性能优化谈到redis缓存-谈一谈缓存的穿透、雪崩、击穿

1-9network configuration in VMWare

Binary sort tree

Msp430f5529lp official board (red) can not debug the problem

ciscn_2019_en_2

使用VS2022編譯Telegram桌面端(tdesktop)

Implementation notes of least square fitting conic in stm32

ADC acquisition noise and comparison between RMS filter and Kalman filter

Mpu6050 reads the ID incorrectly and 0xd1 occurs (the correct ID should be 0x68 or 0x69). Solution.
随机推荐
WordPress
Analyze the five root causes of product development failure
mtb13_ Perform extract_ blend_ Super{candidate (primaryalternate) \u unique (nullable filtering \foreign\index\granulati
ETCD数据库源码分析——集群通信初始化
Simple deepclone
[TSP problem] solving traveling salesman problem based on Hopfield neural network with matlab code
Sqlserver is case sensitive
[image detection] vascular tracking and diameter estimation based on Gaussian process and Radon transform with matlab code
C thread pool control semaphore
[learn FPGA programming from scratch -44]: vision chapter - integrated circuit helps high-quality development in the digital era -1- main forms of integrated circuit chips
QT excellent open source project 9: qtox
简单 deepclone
Msp430f5529lp official board (red) can not debug the problem
ASP.NET cache缓存的用法
智慧家——全家具功能
Daily question: the difference between threads and processes
【系统架构】-什么是MDA架构、ADL、DSSA
Preordered clue binary tree
Data synchronization
DPVS fullnat mode kept