Using the declarations
typedef vector<string> Row;
typedef vector<Row> Matrix;
write a function
int number_of_words(const Matrix& m, char c, int k);
that returns how many words @w@ of the Matrix @m@ have the character @c@ at the position @k@, that is, fulfil @p[k]@ @c@ (when @p[k]@ exists). Take into account that the “matrix” @m@ is not necessary rectangular, i.e., some rows may be larger than others.
@k@
You only need to submit the required procedure; your main program will be ignored.