lpcstr与lpctstr的区别
来源:互联网 发布:网络音乐地址mp3 编辑:程序博客网 时间:2024/05/02 16:40
LPCSTR A 32-bit pointer to a constant character string.
LPSTR A 32-bit pointer to a character string.
LPCTSTR A 32-bit pointer to a constant character string that is portable for Unicode and
LPSTR A 32-bit pointer to a character string.
LPCTSTR A 32-bit pointer to a constant character string that is portable for Unicode and
DBCS.
LPTSTR A 32-bit pointer to a character string that is portable for Unicode and DBCS
LPTSTR A 32-bit pointer to a character string that is portable for Unicode and DBCS
LPWSTR 就是wchar*是支持unicode等双字节的字符是16bits
LPSTR 是char*是ansi单子节8bits
LPCTSTR 是const char*
LPTSTR 是一个宏
#ifdef _UNICODE
#define LPTSTR LPWSTR
#else
#define LPTSTR LPSTR
#endif
也就是说当你定义了_UNICODE宏LPTSTR就是LPWSTR
没有定义_UNICODE,LPTSTR就是LPSTR
LPSTR 是char*是ansi单子节8bits
LPCTSTR 是const char*
LPTSTR 是一个宏
#ifdef _UNICODE
#define LPTSTR LPWSTR
#else
#define LPTSTR LPSTR
#endif
也就是说当你定义了_UNICODE宏LPTSTR就是LPWSTR
没有定义_UNICODE,LPTSTR就是LPSTR
可以用ATL的W2T,T2W,W2A,A2W,A2T,T2A六个宏转换
char s[20]是20个字节的数组
而char *s只是一个指针他只有16/32/64位字节
而char *s只是一个指针他只有16/32/64位字节
从这个意义上char s[20] 相当于 char *s = new char[20];
他们分配内存的位置也不同,特别当char s[20]是全局变量时。
char s[20] 不等于 char *s = new char[20] 了。
char s[20] 不等于 char *s = new char[20] 了。
- lpcstr与lpctstr的区别
- LPCSTR,LPCTSTR,LPCWSTR的区别
- LPTSTR、LPCSTR、LPCTSTR、LPSTR的区别
- LPCTSTR LPCWSTR LPCSTR区别
- LPTSTR、LPCSTR、LPCTSTR、LPSTR区别
- LPTSTR、LPCSTR、LPCTSTR、LPSTR区别
- LPCTSTR,LPCSTR,LPTSTR,LPSTR的区别及用法
- LPSTR、LPCSTR、LPTSTR和LPCTSTR的意义及区别
- LPSTR、LPCSTR、LPTSTR和LPCTSTR的意义及区别
- LPSTR、LPCSTR、LPTSTR和LPCTSTR的意义及区别
- LPCTSTR,LPCSTR,LPTSTR,LPSTR的区别及用法
- LPSTR、LPCSTR、LPTSTR和LPCTSTR的意义及区别
- LPSTR、LPCSTR、LPTSTR和LPCTSTR的意义及区别
- LPSTR、LPCSTR、LPTSTR和LPCTSTR的意义及区别
- LPSTR、LPCSTR、LPTSTR和LPCTSTR的意义及区别
- LPSTR、LPCSTR、LPTSTR和LPCTSTR的意义及区别
- LPCTSTR LPCWSTR LPCSTR三者的含义和区别
- LPSTR、LPCSTR、LPTSTR和LPCTSTR,LPVOID的意义及区别
- SC介绍和教程
- 鼠标屏幕取词的原码! 贴出来讨论兼求教,请高手一定留言,谢
- 测试
- 给编程入门者的建议
- 度
- lpcstr与lpctstr的区别
- 共同进步论坛
- 关于 volatile
- Ping命令详解
- 东西方文化差异导致的ADODB.Stream 错误 '800a0bbc'
- PNG 文件在 Internet Explorer 中不显示为透明
- C++的RTTI 观念和用途[转]
- 李小龍傳
- Blog one