#include #include // Your code here int main() { std::vector v {}; // Create 8 spaces for ( unsigned int i{}; i < 8; ++i ) { v.push_back(Inventory_Space{new int{1}}); } for ( unsigned int i{0}; i < v.size(); ++i ) { // Merge each space with the next. Empty spaces will "bubble" to // the end as each iteration drop the next space into it. for ( unsigned int j{1}; j < v.size(); ++j ) { v.at(j-1).merge( v.at(j) ); } // Print all spaces after each iteration (one line of output) for ( unsigned int k{0}; k < v.size(); ++k ) { v.at(k).print(); } std::cout << std::endl; } return 0; }