title: C++ error making a vector using structs
body: <p>I'm attempting to create a c++ program that uses a text file as a database. To do this, it stores lines in the text file (which represent songs) as "Revolution Diplo Revolution 320 12"
  When that sentence is split (a whole other dilemma), the data values are name, artist, album, kilobytes/second, and size in megabytes, respectively. </p>
  
  <p>I'm getting the following errors:</p>
  
  <ol>
  <li><p>‘main()::song’ uses local type ‘main()::song’, </p></li>
  <li><p>Trying to instantiate ‘template class std::allocator’, </p></li>
  <li><p>Template argument 2 is invalid, and </p></li>
  <li><p>A function-definition is not allowed here before ‘{’ token</p></li>
  </ol>
  
  <p>And I cannot figure out how it works at all.</p>
  
  <pre><code>struct song{
      string name;
      string artist;
      string album;
      string kbs;
      string size;
  }; 
  
  //Declare our function that will search
  vector&lt;song&gt; loadStructsInData(){ //THIS LINE IS WHERE THE ERROR ARISES
      /* this part just reads a file and interprets each line as structs, like a database */
  
      return songs;
      cout&lt;&lt;"All done!"&lt;&lt;endl&lt;&lt;endl;
  }
  </code></pre>
  
  <p>And it's all in the main() function.</p>