当前位置:网站首页>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());
边栏推荐
- Microservice practice | fuse hytrix initial experience
- Mysql 多列IN操作
- 图像识别-数据采集
- Machine learning practice: is Mermaid a love movie or an action movie? KNN announces the answer
- Matplotlib swordsman line - first acquaintance with Matplotlib
- JDBC review
- Thinkphp5 how to determine whether a table exists
- Micro service practice | introduction and practice of zuul, a micro service gateway
- 深入剖析JVM是如何执行Hello World的
- C语言之最小数
猜你喜欢
随机推荐
Number structure (C language -- code with comments) -- Chapter 2, linear table (updated version)
What are the waiting methods of selenium
Knife4j 2. Solution to the problem of file control without selection when uploading x version files
web安全与防御
zk配置中心---Config Toolkit配置与使用
记录下对游戏主机配置的个人理解与心得
Required request body is missing:(跨域问题)
cmake的命令-官方文档
一次聊天勾起的回忆
道阻且长,行则将至
MySql报错:unblock with mysqladmin flush-hosts
Navicat 远程连接Mysql报错1045 - Access denied for user ‘root‘@‘222.173.220.236‘ (using password: YES)
Mysql默认事务隔离级别及行锁
个人经历&&博客现状
图像识别-数据标注
Idea view bytecode configuration
微服务实战|声明式服务调用OpenFeign实践
Who is better for Beijing software development? How to find someone to develop system software
Thinkphp5 how to determine whether a table exists
微服务实战|原生态实现服务的发现与调用