#include <vector>
#include <string>
#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
    vector<vector<string> > ptextarr = {{"this", "is", "a", "test"},
                                        {"this"},
                                        {"is", "one", "as", "well"},
                                        {"the", "word", "root", "is", "here"},
                                        {"and", "here:", "root"}};
    for(size_t n = 0; n < ptextarr.size(); ++n)
    {
        auto i = find(ptextarr[n].begin(), ptextarr[n].end(), "root");
        if(ptextarr[n].end() != i)
            std::cout << "Found root at row " << n << " col " << i-ptextarr[n].begin() << '\n';
    }                                                  
}