So im creating a piece of coursework using stacks, its small game that could be implemented into an RPG game. Where basically you open 3 chests looking for gear.
I have my gear/loot and can cal it randomly that is all fine.
HOWEVER i MUST use stacks in my coursework therefore i am trying to use them to create the chests.
All the chest needs is a name and the ability to hold a set number of items in a stack.
Stacks are confusing me, i have created my stack within the Chest class. however how do i write a constructor for it?
how do i push my Loot onto it?
std::stack<Loot> MyLoot; // the type in the < > can be any type
MyLoot.emplace(/*Args*/) // calls a Loot constructor with the arguments. places Loot object at top of stack