#include <iostream>
class A {};
class B {};
class C : public A, public B {
int a;
};
int main() {
std::cout << sizeof(C) << std::endl;
return 0;
}
If I compile above code using cl, the output is '8'. While compiling with g++, the output will be '4'.
Without multiple inheritance the output will be '4' with both compilers.
Thanks.