I\'d love to be able to do this:
class myInt : public int
{
};
Why can\'t I?
Why would I want to? Stronger typing. For example, I
What does it mean to inherit from an int?
"int" has no member functions; it has no member data, it's a 32 (or 64) bit representation in memory. It doesn't have it's own vtable. All what it "has" (it doesn't really even own them) are some operators like +-/* that are really more global functions than member functions.