title: C++ Pointing to classes
body: <p>I'm going through a C++ book at the moment and i'm slightly confused about pointing to classes.</p>
  
  <p>Earlier in the book the examples used classes and methods in this way:</p>
  
  <pre><code>Calculator myCalc;
  myCalc.launch();
  
  while( myCalc.run() ){
      myCalc.readInput();
      myCalc.writeOutput();
  }
  </code></pre>
  
  <p>However, now it's changed to doing it this way:</p>
  
  <pre><code>Calculator* myCalc = new Calculator;
  myCalc -&gt; launch();
  
  while( myCalc -&gt; run() ){
      myCalc -&gt; readInput();
      myCalc -&gt; writeOutput();
  }
  </code></pre>
  
  <p>And I can't seem to find an explanation in there as to WHY it is doing it this way.</p>
  
  <p>Why would I want to point to a class in this way, rather than use the standard way of doing it?</p>
  
  <p>What is the difference? And what circumstances would one or the other be preferable?</p>
  
  <p>Thank you.</p>