title: When do you want to use pointers vs values in C++?
body: <p>I'm coming from Java and attempting to learn C++.</p>
  
  <p>As far as I can tell, using Pointers is very similar to how reference variables work in Java, in that you pass a memory address to the value.  So I feel like I have gotten a pretty good understanding of them. I also understand that these variables are stored on the heap.</p>
  
  <p>However, I see that there is another way in which you can declare variables in C++, without the new operator/pointers simply doing something like:</p>
  
  <pre><code>Employee boss("Frank");
  </code></pre>
  
  <p>Which will create a value of Employee with "Frank" as the parameter.  These variables are stored on the stack.</p>
  
  <p>So, you have these 2 very different ways of creating variables and both with their own unique behavior (with memory management as well?).  </p>
  
  <p>My question is, when is it appropriate to use pointers VS values?  What is the best practice?  How should I know in what way I want to declare my variables most of the time?</p>