c++ int转字符串 char转字符串
2010-06-15 11:33
501 查看
代码
第一种
int a = 111;
char b[20];
itoa(a,b,10);
xxx.SetWindowText(CString(b));
第二种
int a = 111;
TCHAR b[20]={0};
_itot(a,b,10);
xxx.SetWindowText(b);
第三种
CString str;
str.Format(_T("%d"), a);
SetWindowText(str);
第一种
int a = 111;
char b[20];
itoa(a,b,10);
xxx.SetWindowText(CString(b));
第二种
int a = 111;
TCHAR b[20]={0};
_itot(a,b,10);
xxx.SetWindowText(b);
第三种
CString str;
str.Format(_T("%d"), a);
SetWindowText(str);
相关文章推荐
- C++ 中涉及到的 字符串转换 std::string CString char* Int 等
- c++ int to string 整型到字符串
- C/C++中各种类型int、long、double、char表示范围(最大最小值)
- 【转】[VC/C++]CString,int,string,char*之间的转换2007-11-06 23:26string 转 CString
- C++ 中int,char,string,CString类型转换
- C++ int,char,string,CString类型转换(整理总结)
- C/C++中各种类型int、long、double、char表示范围(最大最小值)
- C/C++中int/long/float/double数值类型与字符串互相转换[总结]
- QT中char[]和int拼接成字符串
- C++中,int和char互转函数_itoa atoi、atof、itoa、itow _itoa_s 类型转换使用说明
- C/C++中各种类型int、long、double、char表示范围(最大最小值)
- C++ 中int,char,string,CString类型转换
- C/C++各种类型int、long、double、char表示范围(最大和最小)
- C/C++中各种类型int、long、double、char表示范围(最大最小值)
- MFC/C++/C中字符类型CString, int, string, char*之间的转换
- C++ int,char,string,CString类型转换(整理总结)
- C++int转字符串
- C++中字符串string和整形int的转化
- Windows,C/C++_字符串转换_MultiByteToWideChar和WideCharToMultiByte的正确使用方法及参数详解
- 不调用库函数,实现字符串复制函数char * strcpy(char * dst, const char * src) C/C++软件开发求职面试题 必备考点(二)