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.

你可能感兴趣的:(String)