title: Create a linked vector and lists
body: <p>I want to create vector which stores pointers to lists as shown in image.<img src="https://i.stack.imgur.com/z5uzw.png" alt="This is how it looks">
   I don't know how many lists will be needed here. So, I want to write function like this</p>
  
  <pre><code>vector&lt;node*&gt; address; //node is class.
  if ((int)address.size()&lt;number)  //number is integer taken as input to function.
      { while((int)address.size()!=number)
          {address.push(/*here I want some function which will generate
   empty list and return pointer to head node or any information 
  that will help to access list later*/)
          }
  else
  {    address[number-1].push_back(name); //name has type string;
  //this line may be wrong for syntax but idea is A[i] gives me 
     // list where I want to put name.
  
  }
  </code></pre>
  
  <p>Preferably using STL library.</p>