the memory of virtual base class of C++
来源:互联网 发布:sql过滤重复字段 编辑:程序博客网 时间:2024/05/21 21:02
class X {};
class Y : public virtual X {};
class Z : public virtual X {};
class A : public Y, public Z {};
class A2: public virtual Y, public virtual Z {};
int main(){
cout<<sizeof(X)<<endl; // 1
cout<<sizeof(Y)<<endl; // 4
cout<<sizeof(A)<<endl; // 8
cout<<sizeof(A2)<<endl; // 12 ??
return 1;
}
class Y : public virtual X {};
class Z : public virtual X {};
class A : public Y, public Z {};
class A2: public virtual Y, public virtual Z {};
int main(){
cout<<sizeof(X)<<endl; // 1
cout<<sizeof(Y)<<endl; // 4
cout<<sizeof(A)<<endl; // 8
cout<<sizeof(A2)<<endl; // 12 ??
return 1;
}
- the memory of virtual base class of C++
- The summary of virtual memory
- Question 48: In C++, which of the following statements accurately describe a base class destructor calling a virtual function ov
- Virtual Memory II: the return of objrmap
- What’s the behavior when calling an overwritten virtual method in the constructor method of a base class?
- Simple summary of virtual memory
- Inheritance is the base class of evil (Sean Parent)
- Memory Layout (Virtual address space of a C process)
- the memory of php study
- In the name of memory
- The problem of Memory Leak
- The Introduction of Memory Leaks
- The Introduction of Memory Leaks
- The Introduction of Memory Leaks
- 虚基类(Virtual Base Class)
- virtual base class
- [windows_internals]Memory Layout (Virtual address space of a C process) under Linux OS
- Memory Layout of C Programs
- 梁肇新《编程高手箴言》读书笔记(一)
- 2007 IT市场十大事件
- zlib
- SVGMap SVGFigure are very good way in future under mobile device
- 挪威车主遭遇计算机“打劫” 停车两小时收费80万
- the memory of virtual base class of C++
- 实践单元测试-Using NUnit
- 学习信息技术
- 无论浏览者在IE选择什么编码,都能正常显示.
- nunit使用指南之—NUnit Quick Start
- 学习ASP.NET之路
- 如何在 Windows 环境下使用 Scintilla 编辑控件?
- 迭代器模式(Iterator Pattern)
- SVG(可伸缩向量图形)基础教程