When you do vector<vector<char> > temp; , it makes a 2d char vector. So temp[0][0] would be a slot, temp[n][n] would be another, etc...
vector<vector<char> > temp; makes an empty vector of empty vectors. Using temp[x][y] will try to access an element that doesn't exist unless the vectors are resized (or perhaps initialized correctly.)
vector<vector<char>> temp(8, vector<char>(8)) ;
creates a vector of 8 vectors of 8 char which may be used (almost) equivalently to: char[8][8] temp ;
Alternately,
1 2 3 4 5 6
vector<vector<char>> temp ;
temp.resize(8) ;
for ( auto& element : temp )
element.resize(8) ;
// now temp may be indexed appropriately.