#include <iostream>
#include <vector>
using namespace std;
struct struct1
{
vector<unsigned> vec1;
};
int main() {
vector<struct1> vecStruct1;
struct1 obj1Struct1;
struct1 obj2Struct1;
vecStruct1.push_back(obj1Struct1);
vecStruct1.push_back(obj2Struct1);
cout << "Before resizing the vector:" << endl;
cout << "Address of vecStruct1[0]:" << &vecStruct1[0] << endl;
cout << "Address of vecStruct1[1]:" << &vecStruct1[1] << endl;
cout << "Capacity of the vector in vecStruct1[0]:" << vecStruct1[0].vec1.capacity() << endl;
cout << "Capacity of the vector in vecStruct1[1]:" << vecStruct1[1].vec1.capacity() << endl;
cout << "Address of the 0th internal vector:" << &(vecStruct1[0].vec1[0]) << endl;
cout << "Address of the 1st internal vector:" << &(vecStruct1[1].vec1[0]) << endl;
cout << endl;
vecStruct1[0].vec1.resize(1000);
cout << "After resizing vecStruct1[0]:" << endl;
cout << "Address of vecStruct1[0]:" << &vecStruct1[0] << endl;
cout << "Address of vecStruct1[1]:" << &vecStruct1[1] << endl;
cout << "Capacity of the vector in vecStruct1[0]:" << vecStruct1[0].vec1.capacity() << endl;
cout << "Capacity of the vector in vecStruct1[1]:" << vecStruct1[1].vec1.capacity() << endl;
cout << "Address of the 0th internal vector:" << &(vecStruct1[0].vec1[0]) << endl;
cout << "Address of the 1st internal vector:" << &(vecStruct1[1].vec1[0]) << endl;
cout << endl;
vecStruct1[1].vec1.resize(2000);
cout << "After resizing vecStruct1[1]:" << endl;
cout << "Address of vecStruct1[0]:" << &vecStruct1[0] << endl;
cout << "Address of vecStruct1[1]:" << &vecStruct1[1] << endl;
cout << "Capacity of the vector in vecStruct1[0]:" << vecStruct1[0].vec1.capacity() << endl;
cout << "Capacity of the vector in vecStruct1[1]:" << vecStruct1[1].vec1.capacity() << endl;
cout << "Address of the 0th internal vector:" << &(vecStruct1[0].vec1[0]) << endl;
cout << "Address of the 1st internal vector:" << &(vecStruct1[1].vec1[0]) << endl;
cout << endl;
return 0;
}