当前位置:网站首页>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());
边栏推荐
- Web security and defense
- Required request body is missing:(跨域问题)
- Solutions to Chinese garbled code in CMD window
- 每天睡前30分钟阅读Day6_Day6_Date_Calendar_LocalDate_TimeStamp_LocalTime
- Matplotlib swordsman - a stylist who can draw without tools and code
- Amq6126 problem solving ideas
- hystrix 实现请求合并
- Microservice practice | declarative service invocation openfeign practice
- FragmentTabHost实现房贷计算器界面
- 微服务实战|原生态实现服务的发现与调用
猜你喜欢

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

微服务实战|声明式服务调用OpenFeign实践

Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedd

在SQL注入中,为什么union联合查询,id必须等于0

c语言编程题

How to use PHP spoole to implement millisecond scheduled tasks

Bold prediction: it will become the core player of 5g

Typeerror: X () got multiple values for argument 'y‘

vs+qt 设置应用程序图标

图像识别-数据标注
随机推荐
Long summary (code with comments) number structure (C language) -- Chapter 4, string (Part 1)
Web security and defense
Microservice practice | Eureka registration center and cluster construction
DTM distributed transaction manager PHP collaboration client V0.1 beta release!!!
QT信号槽总结-connect函数错误用法
tinyxml2 读取和修改文件
Difference between redis serialization genericjackson2jsonredisserializer and jackson2jsonredisserializer
Oracle delete tablespace and user
Mysql默认事务隔离级别及行锁
Navicat remote connection MySQL reports an error 1045 - access denied for user 'root' @ '222.173.220.236' (using password: yes)
定时线程池实现请求合并
Chrome视频下载插件–Video Downloader for Chrome
图像识别-数据清洗
Record personal understanding and experience of game console configuration
In depth analysis of how the JVM executes Hello World
Beats (filebeat, metricbeat), kibana, logstack tutorial of elastic stack
Chrome browser tag management plug-in – onetab
QT QLabel样式设置
Bold prediction: it will become the core player of 5g
Hystrix implements request consolidation