fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class A
  5. {
  6.  
  7. virtual void func();
  8. };
  9.  
  10. class B:public A
  11. {
  12.  
  13. };
  14.  
  15. int main() {
  16.  
  17. cout<<"Sizeof B :"<<sizeof(B);
  18. return 0;
  19. }
Success #stdin #stdout 0.01s 5284KB
stdin
Standard input is empty
stdout
Sizeof B :8