title: C++ pointer and reference with new keyword when instantiating
body: <p>When I want to instantiate a class in C++ I usually go this way</p>
  
  <pre><code>Book bk = new Book();
  </code></pre>
  
  <p>My professor recently did this</p>
  
  <pre><code>Book &amp;bk = *new Book();
  </code></pre>
  
  <p>He only told me that he would use a reference to be able to use the dot (eg bk.getTitle();) operator instead of arrow (eg bk->getTitle();). I understand this part of the code but what happens when you use the * operator in combination with new?</p>
  
  <p>Thanks in advance</p>
  
  <p>the full example code can be found <a href="http://pastebin.com/Lg2YVME5" rel="noreferrer">here</a> it is the arraystack in the main function</p>