C++ vector of String values

Description

C++ vector of String values

#include <iostream>
#include <vector>

using namespace std;

int main()//from w w w .j a  v  a2 s .  co  m
{
    vector<string> names;

    names.push_back("A");
    names.push_back("B");
    names.push_back("C");
    names.push_back("D");
    names.push_back("E");
    names.push_back("F");

    cout << names[0] << endl;
    cout << names[5] << endl;

    return 0;
}



PreviousNext

Related