当前位置:网站首页>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());
边栏推荐
- Beats (filebeat, metricbeat), kibana, logstack tutorial of elastic stack
- 上班第一天的报错(AWVS卸载不彻底)
- 上班第一天的报错(Nessus安装winpcap报错)
- Chrome浏览器标签管理插件–OneTab
- Oracle modify database character set
- Don't look for it. All the necessary plug-ins for Chrome browser are here
- Mysql默认事务隔离级别及行锁
- Enterprise level SaaS CRM implementation
- Safety production early warning system software - Download safety production app software
- 微服务实战|负载均衡组件及源码分析
猜你喜欢
ZK configuration center -- configuration and use of config Toolkit
Chrome视频下载插件–Video Downloader for Chrome
Chrome browser plug-in fatkun installation and introduction
Number structure (C language) -- Chapter 4, compressed storage of matrices (Part 2)
Typeerror: X () got multiple values for argument 'y‘
三相并网逆变器PI控制——离网模式
分享一篇博客(水一篇博客)
Don't look for it. All the necessary plug-ins for Chrome browser are here
From concept to method, the statistical learning method -- Chapter 3, k-nearest neighbor method
企业级SaaS CRM实现
随机推荐
Double non undergraduate students enter the factory, while I am still quietly climbing trees at the bottom (Part 1)
Alibaba / popular JSON parsing open source project fastjson2
Chrome浏览器标签管理插件–OneTab
Learn combinelatest through a practical example
Customize redis connection pool
Break the cocoon | one article explains what is the real cloud primordial
kinect dk 获取CV::Mat格式的彩色RGB图像(openpose中使用)
微服务实战|Eureka注册中心及集群搭建
AMQ 4043 solution for errors when using IBM MQ remote connection
JVM instruction mnemonic
记录下对游戏主机配置的个人理解与心得
Web security and defense
Typora安装包分享
How to choose between efficiency and correctness of these three implementation methods of distributed locks?
ClassFile - Attributes - Code
自定義Redis連接池
How to use pyqt5 to make a sensitive word detection tool
Oracle delete tablespace and user
web安全与防御
Microservice practice | Eureka registration center and cluster construction