#include #include #include #include using namespace std; struct Shooter { string name; int threesMade; }; int main() { vector s { {" ", 0 }, {"Stephen Curry", 4024}, {"Ray Allen", 2973}, {"James Harden", 2967}, {"Damian Lillard",2595}, {"Reggie Miller", 2560} }; vector::size_type n {s.size()}; cout << "The vector was born holding these " << n-1 << " structures:\n"; for (int i {1}; i < n; ++i) { cout << i << " " << setw(15) << s[i].name << " 3PM: " << s[i].threesMade << "\n"; } cout << "\n"; s.push_back({"Klay Thompson", 2461}); // Add a new shooter to the end of the vector n = s.size(); cout << "Now the vector holds these " << n-1 << " structures:\n"; for (int i {1}; i < n; ++i) { cout << i << " " << setw(15) << s[i].name << " 3PM: " << s[i].threesMade << "\n"; } return EXIT_SUCCESS; }