sUserPassWord=(char*)(_bstr_t)value;pMsg->message==WM_KEYDOWN&&pMsg->wParam==13,_bstr_t都啥意思,疯了!
这是啥类型转换?(char*)(_bstr_t)value
为什么c++越学越觉得混乱,c++为什么这么乱七八糟!为什么~!!!
答案:3 悬赏:20 手机版
解决时间 2021-03-01 14:26
- 提问者网友:寂寞撕碎了回忆
- 2021-03-01 10:26
最佳答案
- 五星知识达人网友:走死在岁月里
- 2021-03-01 10:33
不是C++的问题,是windows编程的问题。。
_bstr_t是一个类,方便字符串进行转换
看msdn的介绍:
A _bstr_t object encapsulates the BSTR data type. The class manages resource allocation and deallocation through function calls to SysAllocString and SysFreeString and other BSTR APIs when appropriate. The _bstr_t class uses reference counting to avoid excessive overhead.
是BSTR类型的封装,将BSTR操作的函数SysAllocString 和SysFreeString函数包装起来了,用起来更加简单
_bstr_t是一个类,方便字符串进行转换
看msdn的介绍:
A _bstr_t object encapsulates the BSTR data type. The class manages resource allocation and deallocation through function calls to SysAllocString and SysFreeString and other BSTR APIs when appropriate. The _bstr_t class uses reference counting to avoid excessive overhead.
是BSTR类型的封装,将BSTR操作的函数SysAllocString 和SysFreeString函数包装起来了,用起来更加简单
全部回答
- 1楼网友:十鸦
- 2021-03-01 11:04
你好!
(char*)(_bstr_t)value
是二次类型转换,ADT出来的类型_bstr_t是第一次转换,char*是第二次转化,最终结果是char*。
还有,你这是win32代码?vc++学c++是做虐啊。建议换到linux 用gcc,那样子学的c++才是你的c++,不然你就掉进微软的笼子里了。
仅代表个人观点,不喜勿喷,谢谢。
- 2楼网友:独行浪子会拥风
- 2021-03-01 10:48
强制类型转换
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯