#includeIn this example, we create a vector of pointers to Person objects, add two Person objects to the vector, and then access and print the information about the first person. Finally, we free the dynamically allocated memory using a for loop and the delete operator. C++ Vector Ptr is part of the C++ Standard Library and is included in the#include class Person { public: std::string name; int age; // Constructor Person(std::string n, int a) : name(n), age(a) {} }; int main() { // Create vector of pointers to Person objects std::vector people; // Add people to vector people.push_back(new Person("Alice", 22)); people.push_back(new Person("Bob", 35)); // Access and print information about first person std::cout << "Name: " << people[0]->name << std::endl; std::cout << "Age: " << people[0]->age << std::endl; // Free dynamically allocated memory for (auto p : people) { delete p; } return 0; }