#include #include using namespace std; int main() { vector tbl(10); // creates length 10 vector of int tbl[5] = 7; // stores 7 in slot #5 cout << tbl[5]; // prints 7 tbl[10] = 4; // illegal, but not checked!!! cout << tbl.at(5); // prints 7 tbl.at(10) = 4; // illegal and throws an exception tbl.push_back(4); // creates tbl[10] and stores 4 cout << tbl.at(10); // prints 4 }