title: Insert values in a vector of int sets in C++
body: <p>I want to insert values into a <code>vector</code> of <code>set&lt;int&gt;</code>, which is defined using <code>typedef</code> as given below:</p>
  
  <pre><code>typedef std::set&lt;int&gt; blockSet_t;
  std::vector&lt;blockSet_t&gt;* myvector
  </code></pre>
  
  <p>I want to have values such that <code>myvector[0]</code> has a <code>set</code> of <code>int</code>s, <code>myvector[1]</code> has a different <code>set</code> of <code>int</code>s and so on.</p>
  
  <p>Currently, I am passing this <code>vector</code> to a function which is parsing a file that has the <code>set</code> of integers.</p>
  
  <p>Like: </p>
  
  <pre><code>main()
  {
   std::vector&lt;blockSet_t&gt; myvector;
   filereader(myvector);
  }
  </code></pre>
  
  <p>I read the <code>set</code> from the file and store it in a different <code>blockSet_t  myset;</code></p>
  
  <p>I am using the following loop to store this <code>set</code> to a specific location in the <code>vector</code>:</p>
  
  <pre><code>filereader(&amp;myvector)
  {
   for(int i=0;i&lt;size;i++)
   {
    myvector.push_back(myset); // It does not give error but I don't know myset is stored in which location
  //what I want is to have someting like this
  
    myvector[i].push_back(myset); //so I can store different sets at different locations
   }
  }
  </code></pre>
  
  <p>I also could not figure out, how to display the values from within the<code>vector</code>.</p>
  
  <p>Since it is a vector of <code>set</code>s, I want to display each <code>set</code> (on a different <code>vector</code> index).</p>
  
  <p>Any help in this regard is much appreciated.</p>
  
  <p>Thanks.</p>