- 博客(5)
- 资源 (49)
- 收藏
- 关注
原创 C++之dynamic_cast
在C++中,dynamic_cast主要用于在继承体系中进行“下行转换”, 即将父类的引用或指针转换为子类的引用或指针。根据其参数的不同,其结果有两种。一、对指针进行转换。如果转换失败,其返回NULL。T1 obj;T2* pObj = dynamic_cast(&obj);//转换为T2指针,失败返回NULL二、对引用进行转换。如果转换失败,则抛出bad_cast异常
2013-02-25 11:24:15 488
转载 关于左值与右值(lvalue & rvalue)
Lvalues and RvaluesDan SaksJUNE 1, 2001inShare1C and C++ enforce subtle differences on the expressions to the left and right of the assignment operator
2013-02-21 11:20:24 1798
转载 c++之shared_ptr
Collecting Shared ObjectsBy Herb Sutter and Jim Hyslop, August 01, 20041 Commentshared_ptr is becoming widely available and added to the Standard Library.Herb Sutter (http://www.
2013-02-19 16:25:53 1455
转载 C++之函数指针
[33.1] Is the type of "pointer-to-member-function" different from "pointer-to-function"?Yep.Consider the following function:int f(char a, float b);The type of this function is different dep
2013-02-18 20:28:48 1041
转载 2010年度十大心理学发现
美国《今日心理学》杂志评选出了“2010年度十大心理学发现”,我们不妨关注一下心理学界去年的“大事记”。 1 电脑是把“双刃剑” 数字时代,电脑游戏成了很多人的休闲伙伴。玩游戏好不好?心理学家争论不休。2010年3月,美国爱荷华州立大学特聘教授克雷格·安德森等人指出,有“打打杀杀”等暴力情节的游戏会让人滋生暴力倾向。2010年4月的另一项研究发现,玩PSP游戏机的孩子,学习
2013-02-03 09:17:35 709
NettyChannel
2012-07-11
protobuf lib+source+javadoc
2012-07-05
protobuf.zip
2012-07-04
AutoCompleteTextView
2013-03-26
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人