title: C++ Assigning to an object variable?
body: <p>I am learning c++ coming from a java background, I understand that in Java everything is implicitly a pointer (except primitive types) and so I've been using pointers when I want to use a variable that jumps between already allocated instances of classes. 
  What I would like to know is what happens when you do something like this:</p>
  
  <pre><code>class Thing1{
  public:
      Thing1() {n = 10;}
      int n;
  }
  
  Thing1 A; // Creates an instance of Thing1
  Thing1 B = A; // What happens here???
  B.n = 5;
  A.n = 16;
  </code></pre>
  
  <p>So two Thing1 objects get created on the stack right? Im confused about the behavior of assigning a variable containing an instance of a class to another instance of the class (assuming we dont overload the = operator). Any help?</p>