In this example, we use the C++ STL (Standard Template Library) vector class's push_back() method to add four elements to the vector. It adds elements to the end of the vector, and the size of the vector is updated accordingly. Then, we loop through the vector and print the contents to the console. Package library: C++ Standard Library Code example using Boost library:c++ #include