#include #include using namespace std; struct Player { int health{}; int score{}; int ammo{}; }; void updatePlayer(Player &p) { p.health -= 20; p.score += 50; p.ammo = 30; } int main() { Player p{100, 0, 5}; cout << "Before update:\n"; cout << "Health: " << p.health << ", Score: " << p.score << ", Ammo: " << p.ammo << '\n'; updatePlayer(p); cout << "After update:\n"; cout << "Health: " << p.health << ", Score: " << p.score << ", Ammo: " << p.ammo << '\n'; return EXIT_SUCCESS; }