title: Pointer to vector
body: <p>I've got this code: </p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;vector&gt;
  
  using namespace std;
  
  vector&lt;string&gt; *vecptr;
  int veclen;
  
  void getinput()
  {
   string temp;
   for(int i = 0; i &lt; 3; i++)
      {
       cin&gt;&gt;temp;
       vecptr-&gt;push_back(temp);
      }
      veclen = vecptr-&gt;size();
  }
  
  
  int main()
  {
   getinput();
  
      for(int i = 0; i &lt; veclen; i++)
      {
       cout&lt;&lt;vecptr[i]&lt;&lt;endl;
      }
  
   return 0;
  }
  </code></pre>
  
  <p>My compiler(G++) throw me some errors: test2.cpp:28:17: error: no match for 'operator&lt;&lt;' in 'std::cout &lt;&lt; *(vecptr + ((unsigned int)(((unsigned int)i) * 12u)))' ...</p>
  
  <p>What's wrong? What can I do to fix it?</p>