title: How do I declare an array of objects whose class has no default constructor?
body: <p>If a class has only one constructor with one parameter, how to declare an array? I know that vector is recommended in this case. For example, if I have a class</p>
  
  <pre><code>class Foo{
  
  public:
  Foo(int i) {}
  
  }
  </code></pre>
  
  <p>How to declare an array or a vector which contains 10000 Foo objects?</p>