1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
const int NUM_GAMES = 9;
Game Inventory[NUM_GAMES] =
{
Game("Metal Gear Solid V: The Phantom Pain", 59.99, "Kojima Productions", "Konami"),
Game("Bloodborne", 59.99, "From Software", "SCE"),
Game("The Last of Us", 49.99, "Naughty Dog", "SCE"),
Game("Infamous: Second Son", 39.99, "SCE", "SCE"),
Game("Driveclub", 29.99, "Evolution Studios", "SCE")
Game("Grand Theft Auto", 59.99, "Rockstar Games", "Rockstar North")
};
for (int i = 0; i < NUM_GAMES; i++) // LOOP COUNTER.
{
cout << setw(40) << left << Inventory[i].getDescription() << "$" << setw(10) << left
<< Inventory[i].getCost() << setw(10) << left << Inventory[i].getDeveloper()
<< setw(5) << left << Inventory[i].getPublisher() << "\n";
}
return 0;
}
|