几何尺寸与公差论坛

 找回密码
 注册
查看: 3768|回复: 1

请问在VS.net2005 中如何将字符串CString转化成字符串数组?CHAR[]

[复制链接]
发表于 2007-6-23 19:12:33 | 显示全部楼层 |阅读模式
梦回唐古拉 10:21:54
请问在VS.net2005 中如何将字符串CString转化成字符串数组?CHAR[]

西 西 10:29:14
CString theString( "This is a test" );
int     sizeOfString = (theString.GetLength() + 1);
LPTSTR  lpsz = new TCHAR[ sizeOfString ];
_tcscpy_s(lpsz, sizeOfString, theString);
 楼主| 发表于 2007-6-23 19:12:44 | 显示全部楼层

回复: 请问在VS.net2005 中如何将字符串CString转化成字符串数组?CHAR[]

杰 13:44:30
theString.GetBuffer()就行吧
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|小黑屋|几何尺寸与公差论坛

GMT+8, 2024-5-7 14:25 , Processed in 0.035139 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表