Vectors

10 flashcardsby John
Study these flashcardsFree · spaced repetition · iPhone, Android, Mac & web

All cards

1
What are vectors?
2
What are vectors Similar to in Java
Arraylists
3
Declair vector
vector<data type> name[(size, default_value)] [= {pos0, pos1, pos2} ]
4
Acessing vectors
vector.at(position) or vector[position]
5
Make vector 1 space bigger with value
vector.push_back(value)
6
How to return the size of a vector?
vector.size()
7
How to set the contents and size of a vector to 0
vector.clear()
8
How to add vectors to a file
#include<vector>
9
How to declair a vector of vectors
vector<vector<int>> name
10
How to acess a position in a vector of vectors
vector_of_vectors[vector_position][position_in_vector_position]
Study all 10 cards for free