自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

小猪爱拱地

勤奋和毅力是通向成功的阶梯

  • 博客(2)
  • 资源 (1)
  • 收藏
  • 关注

转载 Memory Layout of C++ Object in Different Scenarios

n this article, we will see the memory layout of different C++ Object. And how different storage & access specifiers affect this memory footprint. I am not going to discuss compiler augmented code, name mangling & working of any C++ mechanism relat

2021-10-21 22:19:59 169

原创 (C++)upcast的时候一定要用 dynamic_cast 吗?

如果是多继承,并且 upcast到不同的接口的时候,需要用dynamic_cast 比如,下面的代码,第37行一定要用 dynamic_cast,因为它是从一个 基类接口转到另外一个基类借口。 1 class A 2 { 3 public: 4 virtual bool IsA(void) = 0; 5 protected: 6 int t_a; 7 }; 8 9 class B 10 { 11

2021-10-18 23:05:50 212

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除