首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

c++MFC int 转 std:string

2012-09-22 
c++MFC int 转 std::string//1.c++获得编辑框的值CEdit* T (CEdit *)GetDlgItem(IDC_msgBox)T-SetWind

c++MFC int 转 std::string
//1.c++获得编辑框的值
CEdit* T = (CEdit *)GetDlgItem(IDC_msgBox);
T->SetWindowText("用户连接成功");
//2.int 转std::string
#include <sstream>
using std::cout;
using std::endl;
std::ostringstream oss;
std::string str="";
int a = 123456789;
oss<<a;
str +=oss.str();
cout<<str<<endl;
//3.

热点排行