2D Vectors and Arrays

Channel:
Subscribers:
2,650
Published on ● Video Link: https://www.youtube.com/watch?v=D5M3sEyr_es



Duration: 1:12:01
209 views
2


Today we went over how to make 2D arrays and vectors. 2D Arrays have a slight advantage here in terms of being more clean-looking (int arr[10][10] makes a 10x10 array, much less typing), and 2D vectors are kinda... meh? Especially since you can't guarantee they remain rectangular in shape, and will cause more cache misses... but they're kinda the best we have right now until the C++ Committee gives us something better.


We also spent some time looking at the demo code for the project and went over again how to use the Colors header file to make a simple 2D text game.







Tags:
csci 40
arrays
vectors
2D arrays
2D vectors
libcolors
text-based games