+ 1

Can someone give me an example of a situation when vectors are used?

I remember reading that vectors are used when there is a lot of data that can't be stored inside an array. But in what situation will I need this. When collecting server infomation or something else? Also what's the limit in which an array can hold? If anyone knows please explain. . - . (I'm starting programming next year in my school, plus I wanna be a game developer so I wanna know as much as possible...)

27th Dec 2018, 7:18 PM
Pirate_Programmer
Pirate_Programmer - avatar
2 Antworten
+ 2
EvilErrorPlayz Gaming vectors are used when you are not aware about size of array initially.. just push_back for each entry and you don't have to be sure about size of entries to be entered into vector from starting itself.
28th Dec 2018, 10:56 AM
Ketan Lalcheta
Ketan Lalcheta - avatar
+ 1
Thx :)
28th Dec 2018, 6:53 PM
Pirate_Programmer
Pirate_Programmer - avatar