inline int square(int x) { return x * x;}
#define SQUARE(x) ((x) * (x))
若執行
SQUARE(3+2);
在繼承時採公開(public)繼承的方式來繼承一個類別時,父類別與子類別為”is-a”的 關係,子類別繼承父類別的公開(public)介面及受保護(protected)的成員,子類別是父類別的細化型態。