如何将Int类型转换成Cstring类型?及存贮 我有一个Cstring类型的变量,要计算它的长度,并将应该长度值付值给INT 类型的DLENGTH,再将DLTNEGTH存入系统所在文件下的ME.TXT中! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 int len = str.GetLength(); CString str = _T("hello");;int nLenfth = str.GetLength();CString strLength;strLength.Format("%d", nLenfth );CStdioFile file("ME.TXT",CFile::modeWrite);file.WriteString(strLength); int nlength= str.GetLength();CFile file;if(file.Open(_T("ME.txt"), CFile::modelWrite)){file.Write(&nlength, sizoef(int));file.Close();} seu07201213(【东南】〖汪洋中的一片叶子〗) ( ) 信誉:100 2006-08-13 15:50:00 得分: 0 CString str = _T("hello");;int nLenfth = str.GetLength();CString strLength;strLength.Format("%d", nLenfth );CStdioFile file("ME.TXT",CFile::modeWrite);file.WriteString(strLength); 已经说的非常清楚了。不可能再清楚了 在类中使用静态成员变量句柄出现问题 异步socket,tcp连接建立后不停调用send,如果客户端来不及接收会怎么样? vs2008 下面建立一个dll项目后怎么生成dll afxtempl.h弹出一堆警告,在线等 陪套光盘怎么使用啊,(菜鸟) 100分求助解决内存问题,在线等,急啊~~~ 搞图像处理的高手,进来留下联系方式吧,:) 一个怪问题? 用VC做串并口通讯的问题 以前看到消息说有一种新的压缩方法效率比ZIP高数十倍,谁有这方面的线索? 外来的ActiveX控件注册失败,大家帮我看一下。 往文件中写二进制数据,但是遇到十六进制的50前面自动加上B0。请问这是为什么?
int nLenfth = str.GetLength();CString strLength;
strLength.Format("%d", nLenfth );CStdioFile file("ME.TXT",CFile::modeWrite);
file.WriteString(strLength);
CFile file;
if(file.Open(_T("ME.txt"), CFile::modelWrite))
{
file.Write(&nlength, sizoef(int));
file.Close();
}
CString str = _T("hello");;
int nLenfth = str.GetLength();CString strLength;
strLength.Format("%d", nLenfth );CStdioFile file("ME.TXT",CFile::modeWrite);
file.WriteString(strLength);
已经说的非常清楚了。不可能再清楚了