title: How to initilaize vector of pairs with NULL (c++)
body: <p>I have a vector of pairs, which is empty at the beginning. I implemented a custom insert and remove method, and I would also like to be able to assign NULL to certain elements, but I can't because it's not a pointer to pair.</p>
  
  <p>If I try to illustrate it more specifically - given a vector V</p>
  
  <pre><code>std::vector&lt; std::pair&lt;A,B&gt; &gt; V;
  </code></pre>
  
  <p>neither</p>
  
  <pre><code>    V.assign(number,NULL);
  </code></pre>
  
  <p>nor</p>
  
  <pre><code>    V[n]=NULL;
  </code></pre>
  
  <p>would work.</p>
  
  <p>I need to do this to check if there already is an element saved in a certain slot. Is there anywork around or should I just create another vector of booleans to save wheter a certian slot is full or not?</p>
  
  <p>NOTE: I know any kind of map would solve it elegantly, but it has to be a vector.</p>