Compare and contrast arrays and vectors. How are they similar? How are they different? Think of example of when you'd use each in a game.
Arrays and vectors both hold variable that would've been multiple separate ones. They are different by arrays have a set number of spaces when vectors are dynamically created which means can be flexible. A array can be used as a fixed inventory in a adventure game. A vector can be used when you use an upgrade to increase the size of you inventory.
No comments:
Post a Comment