#include #include #include #include #include int main() { // make a nested structure to copy - a map of arrays containing vectors of strings auto myNumbers = std::vector{"one", "two", "three", "four"}; auto myColors = std::vector{"red", "green", "blue"}; auto myArray = std::array, 2>{myNumbers, myColors}; auto myMap = std::map {{3, myArray}, {7, myArray}}; // make a deep copy of the map auto mapCopy = myMap; // modify the copy mapCopy[3][0][1] = "2"; mapCopy[7][1][2] = "purple"; std::cout << "the original values:\n"; std::cout << myMap[3][0][1] << "\n"; std::cout << myMap[7][1][2] << "\n\n"; std::cout << "the modified copy:\n"; std::cout << mapCopy[3][0][1] << "\n"; std::cout << mapCopy[7][1][2] << "\n"; }