当前位置:网站首页>QT Chinese programming encounters c2001 error, prompting "there is a newline character in the constant"
QT Chinese programming encounters c2001 error, prompting "there is a newline character in the constant"
2022-07-25 22:41:00 【Things turn at will】
One 、 problem
QT On the use of MSVC To compile part containing Chinese character string There will be compilation errors error: C2001: Line breaks in constants
Two 、 Solution
resolvent :
1、 Settings are tools -> Options -> Text editor -> Behavior ->UTF-8 BOM Set to “ If the code is UTF-8 Then add ”
2、 In the header file or .cpp file , add #pragma execution_character_set("utf-8")
3、 Use Notepad to open the file , Save the file as with BOM head utf-8 Format

Reference resources :
边栏推荐
- Document flow definition, box model related knowledge
- 【Leetcode】502.IPO(困难)
- 武汉理工大学第三届程序设计竞赛 B-拯救DAG王国(拓扑性质处理可达性统计问题)
- [training Day12] x equation [high precision] [mathematics]
- Pyspark data analysis basis: pyspark.sql.sparksession class method explanation and operation + code display
- [training Day12] min ratio [DFS] [minimum spanning tree]
- 英文术语对应的解释
- Examples and points for attention about the use of getchar and scanf
- ECMA 262 12 Lexical Grammer
- JVM memory area
猜你喜欢

C语言逆序打印字符串的两种方法

Xiaobai programmer's fifth day

Xiaobai programmer's seventh day

PySpark数据分析基础:pyspark.sql.SparkSession类方法详解及操作+代码展示

DOM event binding

Von Neumann architecture

Smart S7-200 PLC channel free mapping function block (do_map)

Anaconda~Upload did not complete.

Two methods of printing strings in reverse order in C language

【集训DAY13】Internet【并查集】
随机推荐
[training day15] boring [tree DP]
Xiaobai programmer's fourth day
[training Day11] Calc [mathematics]
XSS tool beef XSS installation and use
关于getchar和scanf的使用示例及注意点
(1) DDL, DML, DQL, DCL and common data types
Array中可以用泛型吗
Floating effect and characteristics
torchvision
Qt5.12 installation error prompt: c:\qt5.12.11\vcredist\vcredist_ msvc2019_ x86.exe /norestart /q
Severely crack down on illegal we media operators according to law: it is urgent to purify the we media industry
[MySQL rights] UDF rights (with Malaysia)
Day006 select structure (if statement exercise)
Interpretation of English terms
IPv4地址已经完全耗尽,互联网还能正常运转,NAT是最大功臣!
Google analyzes how UA can be transferred to the latest version of GA4
面试题 17.11. 单词距离 ●●
Structure principle of micro ball vibration switch with chip
LabVIEW develops PCI-1680U dual port can card
【集训DAY15】Boring【树形DP】