vector of 10 strings : vector definition « vector « C++ Tutorial






#include <vector>
#include <string>
using namespace std;

int main(int argc, char** argv)
{
  vector<string> stringVector(10, "hello");
  return (0);
}








16.11.vector definition
16.11.1.Using a Vector of Booleans
16.11.2.vector declaration
16.11.3.vector of 10 strings
16.11.4.Dynamically allocated vector begins with 0 elements
16.11.5.vector's copy constructor