title: std::vector as a global variable in Visual c++
body: <p>I'm making a windows form application using c++ (perhaps a foolish idea?)</p>
  
  <p>and i have a few global variables:</p>
  
  <pre><code>private: System::Windows::Forms::OpenFileDialog^  openFileDialog;
  private: System::Windows::Forms::ListBox^  outputListBox;
  private: bool done;
  private: array&lt;String^&gt;^ filesList;
  private: vector&lt; FrequencyDataSet &gt; storedModels; 
  </code></pre>
  
  <p>however when i compile it it says:</p>
  
  <pre><code>Error   1   error C4368: cannot define 'storedModels' as a member of managed 'Project::Form1': mixed types are not supported
  </code></pre>
  
  <p>what i want to happen, is that when the application loads, a thread starts in the background and loads in the stored data models. and stores them so they can be accessed by other functions at a later stage. everything else works fine so far, just need to be able to store the models globally. </p>
  
  <p>can anyone suggest an alternative to how i'm going about it?</p>