#include
using namespace std;
class base {
int arr[10];
};
class b1: virtual public base { };
class b2: virtual public base { };
class derived: public b1, public b2 {};
int main(void)
{
cout<<sizeof(derived);
getchar();
return 0;
}
#include
using namespace std;
class base {
int arr[10];
};
class b1: virtual public base { };
class b2: virtual public base { };
class derived: public b1, public b2 {};
int main(void)
{
cout<<sizeof(derived);
getchar();
return 0;
}
No I don’t know the problem
…
pls read about it.
this problem is based on same concept
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.