how to find rows and columns of 2d vector in c++ code example Example: size of a matrix using vector c++ // finding size of a square matrix myVector[0].size();