| <<< std::vector | Index | std::vector construction >>> |
Using prefabricated templates from the STL library is easy:
#include <vector>
#include <string>
using namespace std;
int main (int argc, char* argv[])
{
vector< double > vd; // vd elements are floating point numbers
vector< int > vi; // vi elements are integer numbers
vector< string > vs; // vs elements are string objects
return 0;
}
The typenames which appear inside angled brackets are template parameters.
| <<< std::vector | Index | std::vector construction >>> |