当前位置:网站首页>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());
边栏推荐
猜你喜欢

图像识别-数据标注

Timed thread pool implements request merging

洞见云原生|微服务及微服务架构浅析

Microservice practice | teach you to develop load balancing components hand in hand

2837xd 代码生成——StateFlow(4)

图像识别-数据增广

保存视频 opencv::VideoWriter

Solutions to Chinese garbled code in CMD window

Matplotlib swordsman - a stylist who can draw without tools and code

Micro service practice | introduction and practice of zuul, a micro service gateway
随机推荐
Difference between redis serialization genericjackson2jsonredisserializer and jackson2jsonredisserializer
Chrome浏览器插件-Fatkun安装和介绍
tinyxml2 读取和修改文件
Beats (filebeat, metricbeat), kibana, logstack tutorial of elastic stack
Number structure (C language) -- Chapter 4, compressed storage of matrices (Part 2)
2837xd Code Generation - stateflow (4)
微服务实战|Eureka注册中心及集群搭建
定时线程池实现请求合并
图像识别-数据采集
互联网API接口幂等设计
AMQ 4043 solution for errors when using IBM MQ remote connection
Demand delineation executive summary
Read Day5 30 minutes before going to bed every day_ All key values in the map, how to obtain all value values
上班第一天的报错(AWVS卸载不彻底)
Pool de connexion redis personnalisé
Chrome视频下载插件–Video Downloader for Chrome
每天睡前30分钟阅读Day6_Day6_Date_Calendar_LocalDate_TimeStamp_LocalTime
JDBC回顾
MySQL error: unblock with mysqladmin flush hosts
Operation and application of stack and queue