title: Objects on a stack vs Objects on a heap in C++
body: <p>I am a new comer in C++ and found that in C++, you have 2 methods to create a object: object on a stack and object on a heap.</p>
  
  <p>But I am curious to know what are the pros and cons of using object on stack vs. object on heap.</p>
  
  <p>In what situations, first method is preferable over the second method and vice versa?</p>