title: What goes to RAM, Harddrive, Stack and Heap in C++?
body: <p>Could someone tell in general what goes to what (Harddrive,RAM, Stack or Heap) at runtime in C++ for these instances : </p>
  
  <ul>
  <li><p>Local/global variables </p></li>
  <li><p>Classes, Methods and functions</p></li>
  <li><p>Pointers</p></li>
  <li><p>Objects</p></li>
  </ul>
  
  <p>And is Stack/Heap both located in physical RAM?</p>
  
  <p>I would appreciate if someone could include hardware analogy in the answer.
  Thanks.</p>