当前位置:网站首页>Int to string, int to qstring
Int to string, int to qstring
2022-07-02 09:38:00 【Ignorant dream fireworks】
1 int turn string
1.1 The flow of << Operator
// The flow of << Operator
int a = 10;
stringstream ss;
ss << a;
string str = ss.str();
1.2 c++11 std::to_string
int a = 10;
std::string s = std::to_string(a);
2 string turn int
2.1 std::atoi
string _str = pSaveConfigElement->FirstChildElement("SaveVideoWidth")->GetText();
int mVideoWidth = std::atoi(_str);
3 int turn QString
3.1. Call directly QString::number()
int number = 10;
QString str = QString::number(number );
4 QString turn int
QString str = “10”;
int number = str.toInt();
5 QString turn string
QString str = “10”;
string stdStr= str.toStdString();
6 string turn QString
std::string _stdStr = "sfd";
QString _qStr(_stdStr.c_str());
边栏推荐
- Oracle modify database character set
- What are the differences between TP5 and laravel
- A detailed explanation takes you to reproduce the statistical learning method again -- Chapter 2, perceptron model
- DTM distributed transaction manager PHP collaboration client V0.1 beta release!!!
- Attributes of classfile
- Actual combat of microservices | discovery and invocation of original ecosystem implementation services
- Learn combinelatest through a practical example
- Creation and jump of activity
- Mathematics in machine learning -- point estimation (I): basic knowledge
- JDBC回顾
猜你喜欢

三相逆变器离网控制——PR控制

How to use pyqt5 to make a sensitive word detection tool

破茧|一文说透什么是真正的云原生

View the port of the application published by was

Ora-12514 problem solving method

上班第一天的报错(AWVS卸载不彻底)

Microservice practice | fuse hytrix initial experience

Typora installation package sharing

攻防世界-Web进阶区-unserialize3

tinyxml2 读取和修改文件
随机推荐
Read Day5 30 minutes before going to bed every day_ All key values in the map, how to obtain all value values
Microservice practice | fuse hytrix initial experience
记录一下初次使用Xray的有趣过程
Bold prediction: it will become the core player of 5g
Statistical learning methods - Chapter 5, decision tree model and learning (Part 1)
微服务实战|原生态实现服务的发现与调用
Number structure (C language) -- Chapter 4, compressed storage of matrices (Part 2)
Hystrix implements request consolidation
每天睡前30分钟阅读Day5_Map中全部Key值,全部Value值获取方式
2837xd Code Generation - stateflow (4)
How to use pyqt5 to make a sensitive word detection tool
MySQL事务
In depth analysis of how the JVM executes Hello World
Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedd
Chrome浏览器插件-Fatkun安装和介绍
2837xd 代码生成——StateFlow(4)
Timed thread pool implements request merging
企业级SaaS CRM实现
Matplotlib swordsman line - first acquaintance with Matplotlib
Oracle modifies tablespace names and data files