CStringW和LPTSTR有什么区别? [英] what is Difference between CStringW and LPTSTR?

查看:120
本文介绍了CStringW和LPTSTR有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

CStringW和lptstr之间的区别是什么?CStringA和lpstr之间的



$ b $抱歉,我知道这个问题非常简单和基本但请回答。

谢谢

Hi All,
What is difference between CStringW and lptstr
or
between CStringA and lpstr?
sorry, I know this question is very simple and basic but please answer.
Thanks

推荐答案

看看这个:



https:// groups。 google.com/forum/#!topic/microsoft.public.vc.mfc/VFDxz5XGyPU [ ^ ]


CString 是一个处理字符数据(字符串)的类(MFC / ATL)。 A 版本限制为ASCII字符(8位),而 W 版本处理Unicode(16位)。 LPTSTR TCHAR * 的Windows定义,它是指向字符串的指针。 T 类型将根据编译器设置生成为ASCII或Unicode。 LPSTR char * 的Windows定义,仅为ASCII。
CString is a class (MFC/ATL) that handles character data (strings). The A version is restricted to ASCII characters (8 bit), while the W version handles Unicode (16 bit). LPTSTR is a Windows definition for TCHAR* which is a pointer to a character string. The T types will be generated as ASCII or Unicode depending on the compiler settings. LPSTR is a Windows definition for char* and is ASCII only.


这篇关于CStringW和LPTSTR有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆