static_cast < type-id > ( expression )The expression static_cast < type-id > ( expression ) converts expression to the type of type-id based solely on the types present in the expression. No run-time type check is made to ensure the safety of the conversion.reinterpret_cast < type-id > ( expression )The reinterpret_cast operator allows any pointer to be converted into any other pointer type, and it allows any integral type to be converted into any pointer type and vice versa. Misuse of the reinterpret_cast operator can easily be unsafe. Unless the desired conversion is inherently low-level, you should use one of the other cast operators.dynamic_cast < type-id > ( expression )The expression dynamic_cast< type-id >( expression ) converts the operand expression to an object of type type-id. The type-id must be a pointer or a reference to a previously defined class type or a "pointer to void". The type of expression must be a pointer if type-id is a pointer, or an l-value if type-id is a reference.in addition:
const_cast < type-id > ( expression )The const_cast operator can be used to remove the const, volatile, and __unaligned attribute(s) from a class.MSDN has the details!
const_cast < type-id > ( expression )The const_cast operator can be used to remove the const, volatile, and __unaligned attribute(s) from a class.MSDN has the details!
解决方案 »
- 奇葩的CSocket求解原因?
- 请问MFC ClassWizard如何关联自定义类型的变量?
- CopyFile()
- 求教:AddNew以后Update的问题
- 把ctrl+c发送到串口,要发送什么字符?
- 如何判断某一进程是否已经启动?
- 有哪位大哥知道,SONY 505 NOTEBOOK,怎么进去BIOS?
- 小问题:当改变listctrl的大小时,怎样重排他的icons?
- 我错在哪里?
- 50分~~~~今天看到一个程序提到了命令行的问题,我从来没有听过这个东东,高手解答~~~
- 用ATL开发组件来封装asp网页中遇到的问题:IRequest::get_Form(IRequestDictionary **ppDictReturn)应该怎么用?谢谢!
- 如何在多文档打开的文件中设定光标位置,以便标识那一行???
第二种将第一种转换为静态PA型
第三种将第一种转换为现在PA的类型
第四种PA什么类型PB就是什么类型
http://bbs.bisrs.com/bbs/topic.cgi?forum=25&topic=27y应该对你有些帮助,其实看c++编程思想,上面讲的很全的