C++ 学习笔记


string转LPCWSTR 
#include <iostream>
#include <string>

std::wstring stemp = std::wstring(s.begin(), s.end());
LPCWSTR sw = stemp.c_str();

 





数字转字符串
#include <iostream>
#include <string>

int qq = 123;
std::string str = std::to_string(qq);

 


 

字符串转数字

#include <iostream>
#include <string>

std::string str = "123456";
int qq = stoi(str);

 



posted on 2018-07-20 22:21  Jtuzi小兔  阅读(185)  评论(0)    收藏  举报