<<< Vector data type | Index | Vector operations, cont. >>> |
vector< char > v1; // start off empty v1.push_back( 'a' ); // add an element with character 'a' v1.push_back( 'b' ); // add an element with character 'b' v1.push_back( 'c' ); // add an element with character 'c'
See animation of this code in cjumpstl.exe:
C++ STL tutorial | `---> STL Containers | `---> Stack operations
<<< Vector data type | Index | Vector operations, cont. >>> |