1#include <vector>
2using std::vector;
3
4class MyClass { .... };
5
6vector<MyClass> myVector( 100, MyClass() );
7/* myVector now contains 100 objects of type MyClass, built with the default constructor */
8
9vector<MyClass> myVector2;
10// MyVector2 is empty
11
12myVector2.assign( 100, MyClass() );
13
14// My Vector2 now contains 100 objects of type MyClass, built with default ctor
15