title: Initialise size of std::array in a constructor of the class that uses it
body: <p>Is it possible to use the <code>std::array&lt;class T, std::size_t N&gt;</code> as a private attribute of a class but <strong>initialize its size in the constructor</strong> of the class?</p>
  
  <pre><code>class Router{
      std::array&lt;Port,???&gt; ports; //I dont know how much ports do will this have
  public:
      Switch(int numberOfPortsOnRouter){
          ports=std::array&lt;Port,numberOfPortsOnRouter&gt; ports; //now I know it has "numberOfPortsOnRouter" ports, but howto tell the "ports" variable?
      }
  }
  </code></pre>
  
  <p>I might use a pointer, but could this be done without it?</p>