// 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;

#include "foo.h"

class CD_C
{
 public: 
  CD_C(int theX, const char * const theLabel); // (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=" << x << " f=" << f; }

 private:
  int x;
  Foo_C f;
  Foo_C g;
  Foo_C h;
  
};

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

#endif

