#include <iostream>
#include <memory>
#include <vector>
int main() {
auto a = std::make_shared<std::vector<int>>();
for (int i = 0; i < 3; i++) {
a->push_back(i);
}
for (const auto& i : *a) {
std::cout << i << std::endl;
}
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: