title: I have a class object as a member of another class, how do I initialize as a safe empty state?
body: <p>I have 2 classes, ISBN, Order. I have an ISBN object as a data member of my Order class and I am having issues with the Order constructor to place the ISBN object in a safe empty state.</p>
  
  <p>My Order.h</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  class ISBN;
  
  class Order {
  
  int ordered;
  int delivered;
  ISBN * book;
  bool empty;
  
  public:
  
  Order();
  Order(const ISBN &amp; isbn);
  
  
  };
  </code></pre>
  
  <p>My ISBN.h</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  class ISBNPrefix;
  
  class ISBN {
  
  char isbnNum[13];
  char area[6];
  char publisher[8];
  char title[7];
  char checkDigit[1];
  bool emptycheck;
  bool registered;
  
  public:
  
  ISBN();
  ISBN(const char * str, const ISBNPrefix&amp; list);
  }
  </code></pre>
  
  <p>In my Order constructor I tried this code:</p>
  
  <pre><code>Order::Order() {
  
  ordered = 0;
  delivered = 0;
  empty = true;
  
  *book-&gt;ISBN();
  
  /*
  (*book).isbnNum[0] = '\0';
  book.area[0] = '\0';
  book.publisher[0] = '\0';
  book.title[0] = '\0';
  book.checkDigit[0] = '\0';
  book.emptycheck = true;
  book.registered = false; */
  }   
  </code></pre>
  
  <p>And variations of it, but I get errors like: "type name is not allowed" "expression must have pointer type" etc...Anyone know what my issue is?</p>