Where is memory allocated when creating object on stack?
<p>I dont understand what is happening in the memory in this scenario:</p>

<pre><code>int main(int argc, char** argv) {
    Ninja n; //create a object on the stack?
    Ninja * n = new Ninja;  //create a pointer the the object on the heap?

    return 0;
}
</code></pre>

<p>What is the difference?</p>