Is this nested array using stack or heap memory?
<p>Say I have this declaration and use of array nested in a vector<br></p>

<pre><code>const int MAX_LEN = 1024;
typedef std::tr1::array&lt;char, MAX_LEN&gt; Sentence;
typedef std::vector&lt;Sentence&gt; Paragraph;

Paragraph para(256);
std::vector&lt;Paragraph&gt; book(2000);
</code></pre>

<p>I assume that the memory for <code>Sentence</code> is on the stack.<br> Is that right?
What about the memory for vector <code>para</code>? Is that on the stack i.e. should I worry if my para gets too large? <br>
And finaly what about the memory for book? That has to be on the heap I guess but the nested arrays are on the stack, aren't they?<br>
Additional questions<br>
Is the memory for <code>Paragraph</code> contiguous?<br>
Is the memory for <code>book</code> contiguous?</p>
