<p>Say I've got a class like this:</p>

<pre><code>class Test
{
  int x;
  SomeClass s;
}
</code></pre>

<p>And I instantiate it like this:</p>

<pre><code>Test* t = new Test;
</code></pre>

<p>Is x on the stack, or the heap? What about s?</p>

Since you've used
```
new
```
, it's all on the heap, stored [more or less] contiguously in
```
t
```
's memory area.