zettelkasten
Vectors
Last updated: 1/9/2025
A vector is pretty much like a list. The only thing I want to write about here is that you want to use: vector.at(index); instead of vector[index] because vector.at(index) will throw an exception if the index doesn't exist.
Also whenever indexing through vectors or stuff like that use size_t instead of int or unsigned int because size_t can be the maximum size for an byte on a per-machine basis.
See Also
- [[computer-science]]
- [[Compound Data]]