Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
Multi Inheritance
#include<iostream> class Base{ public: int id=0; }; class B : public Base{ public: int fieldB=0; }; class C : public B{ public: int fieldC=0; }; class D : public B{ public: int fieldD=0; }; class E : public C, public D{ }; int main (){ std::cout<<"Base="<<sizeof(Base)<<std::endl; std::cout<<"B="<<sizeof(B)<<std::endl; std::cout<<"C="<<sizeof(C)<<std::endl; std::cout<<"D="<<sizeof(D)<<std::endl; std::cout<<"E="<<sizeof(E)<<std::endl; }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
VC++ latest rejects istream to nullptr comparison
Revers find file in windows
jkljklj
c++functor
std::function ambiguity vc++
Implements.cpp
Guess a number in c++
Regex failure
What exactly is “broken” with Microsoft Visual C++'s two-phase template instantiation?
PTaHHHa
Please log in to post a comment.