Example of Constructors
class box {public: box () // default constructor { i = 1; } // give data field some default value box (int x) // ordinary constructor { i = x; } box (const box & a) // copy constructor { i = a.i; } // clone argument valueprivate: int i;
box one; // default constructor
box two (7); // ordinary constructor
box three (two); // copy constructor