title: Static vector resize
body: <p>I want to make a static vector in a class and I want to resize the vectors when they are created. I'm trying to do this in the constructor or in the main function. But I can't get it to work. The problem is that I can't call a function of the vector class on this way.
  This is what I have now:</p>
  
  <pre><code>#include &lt;vector&gt;
  
  using namespace std;
  
  class test
  {
  public:
      static vector&lt;int&gt; testvec;
      test();
  };
  
  test::test() //Not static
  {
      test::testvec.resize(0);    //Try 1
  }
  
  vector&lt;int&gt; test::testvec.resize(0); //Try 2
  
  int main()
  {
      test::testvec.resize(0); //Try 3
      test testclass;
  
  
      system("pause");
      return false;
  
  }
  </code></pre>
  
  <p>I need to handle all the data on the vector in every object, that is why I want to make the vector static.</p>
  
  <p>Can someone help me with this?
  Thanks!</p>
  
  <p>Edit: grammer. Every method that I have tried gives a compile error.</p>