Given the following, you'll see that x and y are the same size, but y has an additional function. What things are included in sizeof, and what things are not?
struct x
{
double a;
double b;
double c;
double d;
};
struct y
{
double a;
double b;
double c;
double d;
y(double q, double r, double s, double t) : a(q), b(r), c(s), d(t) {};
};
std::cout << sizeof(x)-sizeof(y) <<std::endl;