// cd.h   Experiments with constructors and destructors
//        When are they called?   P. Conrad for CISC220 06J

#ifndef CD_H
#define CD_H

#include <iostream>
using std::ostream;

class CD_C
{
 public: 
  CD_C(int theX); // (1) ordinary constructor
  CD_C(); // (2) default constructor
  
  
  // big-3
  CD_C(const CD_C & orig); // (3)
  CD_C & operator = (const CD_C & right); // (4)
  ~CD_C(); // (5)

  void print(ostream & out) const { out << x; }

 private:
  int x;

};

ostream & operator << (ostream & left, const CD_C & right); // (6)

#endif

