simple way to add elements in a vector c++ code example
Example 1: adding element in vector c++
vector_name.push_back(element_to_be_added);
Example 2: how to append to a vector c++
//vector.push_back is the function. For example, if we want to add
//3 to a vector, it is just vector.push_back(3)
vector vi;
vi.push_back(1); //[1]
vi.push_back(2); //[1,2]