title: How to save unknown size structure (for later retrieval)
body: <p>My plan is to store a couple dozen rows with 2 items per row and both items will have a different data type. Not sure if this is the right approach and have heard about using vectors but I can't find any samples that will take in 2 items with different types with many rows (an unknown amount of rows) similar to what I'm trying to do here. The following doesn't compile</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;sstream&gt;
  using namespace std;
  
  struct movies_t {
    string title;
    int year;
  } myRecNo[];
  
  void printmovie (movies_t movie);
  
  int main ()
  {
    string mystr;
  
    for (int i=0; i &lt; 2; i++)
    {
      switch (i)
      {
      case 1:
        myRecNo[i].title = "2001 A Space Odyssey";
        myRecNo[i].year = 1968;
  
        cout &lt;&lt; "Auto entry is:\n ";
        printmovie (myRecNo[i]);
        break;
      case 2:
        myRecNo[i].title = "2002 A Space Odyssey";
        myRecNo[i].year = 1978;
  
        cout &lt;&lt; "Auto entry is:\n ";
        printmovie (myRecNo[i]);
        break;
      }
    }
    return 0;
  }
  
  void printmovie (movies_t movie)
  {
    cout &lt;&lt; movie.title;
    cout &lt;&lt; " (" &lt;&lt; movie.year &lt;&lt; ")\n";
  }
  </code></pre>
  
  <p>This is the error I get:</p>
  
  <pre><code>Test1.obj||error LNK2019: unresolved external symbol "struct movies_t * myRecNo" (?myRecNo@@3PAUmovies_t@@A) referenced in function _main|
  </code></pre>