当前位置:网站首页>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());
边栏推荐
- C语言之判断直角三角形
- 个人经历&&博客现状
- Required request body is missing:(跨域问题)
- Typeerror: X () got multiple values for argument 'y‘
- Web security and defense
- Actual combat of microservices | discovery and invocation of original ecosystem implementation services
- hystrix 实现请求合并
- 每天睡觉前30分钟阅读_day3_Files
- 在SQL注入中,为什么union联合查询,id必须等于0
- How to use pyqt5 to make a sensitive word detection tool
猜你喜欢

Timed thread pool implements request merging

Read 30 minutes before going to bed every day_ day4_ Files

Read Day6 30 minutes before going to bed every day_ Day6_ Date_ Calendar_ LocalDate_ TimeStamp_ LocalTime

Chrome browser plug-in fatkun installation and introduction

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

Matplotlib swordsman line - first acquaintance with Matplotlib

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

web安全与防御

并网逆变器PI控制(并网模式)

Navicat remote connection MySQL reports an error 1045 - access denied for user 'root' @ '222.173.220.236' (using password: yes)
随机推荐
How to use pyqt5 to make a sensitive word detection tool
Insight into cloud native | microservices and microservice architecture
kinect dk 获取CV::Mat格式的彩色RGB图像(openpose中使用)
Creation and jump of activity
上班第一天的报错(Nessus安装winpcap报错)
Idea view bytecode configuration
Oracle delete tablespace and user
自定義Redis連接池
The channel cannot be viewed when the queue manager is running
Failed to configure a DataSource: ‘url‘ attribute is not specified and no embedd
Actual combat of microservices | discovery and invocation of original ecosystem implementation services
定时线程池实现请求合并
Number structure (C language -- code with comments) -- Chapter 2, linear table (updated version)
CKEditor 4.10.1 上传图片提示“不正确的服务器响应” 问题解决
每天睡前30分钟阅读Day6_Day6_Date_Calendar_LocalDate_TimeStamp_LocalTime
C语言之到底是不是太胖了
int与string、int与QString互转
Operation and application of stack and queue
How to choose between efficiency and correctness of these three implementation methods of distributed locks?
Redis 序列化 GenericJackson2JsonRedisSerializer和Jackson2JsonRedisSerializer的区别