fork download
  1. #include <iostream>
  2.  
  3. class Base1 { int b1; void Base1Method(); };
  4. class Base2 { int b2; void Base2Method(); };
  5. class Derived : public Base1, Base2
  6. { int d; void DerivedMethod(); };
  7.  
  8. int main()
  9. {
  10. void (Derived::*p_mbr_fn)() ;
  11. std::cout << sizeof(p_mbr_fn) << '\n';
  12. std::cout << sizeof(void*) << '\n' ;
  13. }
Success #stdin #stdout 0s 3340KB
stdin
Standard input is empty
stdout
8
4