title: c++ member function and class size
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/9451471/why-class-size-depends-only-on-data-members-and-not-on-member-functions">Why class size, depends only on data members and not on member functions?</a>  </p>
  </blockquote>
  
  
  
  <p>When I first learnt about Inheritance, my teacher remarked that as opposed to data members, member function don't change the class size. That is, if class B inherits from class A then B's size will be larger than A's size if and only if at least one data member will be added, and won't be changed with respect to function members quantity.
  Is it correct? If so, How this mechanism works? It seems like both members should be held in the heap and therefore will cost in size.</p>
  
  <p>Thank you,
  Guy</p>