vector declaration and size allocation
<p>This is related to my <a href="http://stackoverflow.com/questions/2227939/using-a-vector-data-structure-design-and-syntax-questions">other post</a>. One of the suggestions here was to use vector for class Region.. as illustrated in the following code. I have a few more beginner questions --</p>

<p><strong>a)</strong> How to allocate this vector a size = numOfRegions?  Or do I really need to allocate a size to a vector? </p>

<p><strong>b)</strong> How do I insert objects of class Region to this <code>vector&lt;Region&gt;</code>? All these Region objects need to be managed by <code>class A</code></p>

<p><strong>c)</strong> I am assuming I don't need to delete this vector in class A's distructor .. correct? </p>

<pre><code>struct elemt {
  int* vertex; 
  int foo1;
  double foo2;
};


class Region{
   public:
      std::vector &lt;elemt*&gt; elements;   
      int info;
}



class A{
public:
    std::vector&lt;Region&gt; reg;
    const int numOfRegions = 100;
}
A::A(){
    // how to create and append Region object to vector std::vector&lt;Region&gt; reg ??
    // Do I need to allocate size for this region vector? 
}

A::~A(){
  //do nothing
 // Do I need to delete vector&lt;Region&gt; reg here ??
}

A::doSomething(){

// here I want to append the elements to the vector
// Let i be region 10. 
// Let e1 be an element of "struct elemt" that needs to be added

  reg[i].elements.push_back(e1);

}
</code></pre>
