Language: C++

#include <iostream>
#include <string>
using namespace std;
int main()
{
    int tangoNum;
    cin >> tangoNum;
    string tango[tangoNum];
    int temp[tangoNum];
    int tempFlag[tangoNum];//とったかとってないか
    int kotae = 0;
    for (int i = 0; i < tangoNum; ++i)
    {
        cin >> tango[i];
        tempFlag[i] = 0;
    }
    int qNum;
    string query[qNum];
    int tangoFocus[qNum];//そのクエリーでの調べたい位置
    for (int i = 0; i < qNum; ++i)
    {
        cin >> tangoFocus[i];
        cin >> query[i];
    }
    for (int i = 0; i < qNum; ++i)
    {
        for (int j = 0; j < tangoNum; ++j)
        {
            int temp[j][tango[j].size()];
            for (int l = 0; l < tango[j].size(); ++l)//単語中の文字の位置
            {
                temp[j][l] = find(query[i].begin(),query[i].end(), tango[j][l]);
            }
        }
        for (int j = 0; j < tango[tangoFocus[i]].size(); ++j)//focus単語の文字数，上から何文字目か
        {
            for (int l = 0; l < tangoNum; ++l)//l番目の文字列と，前からj番目の文字と比較
            {
                if(temp[tangoFocus[i]][j]<temp[l][j] && tempFlag[l]==0 && l!=tangoFocus[i]){
                    kotae++;
                    tempFlag[l] = 1;
                }
            }
        }
        cout << kotae << endl;
        for (int j = 0; j < tangoNum; ++j)
        {
            tempFlag[j] = 0;
        }
        kotae = 0;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:34: error: no matching function for call to 'find(std::__cxx11::basic_string<char>::iterator, std::__cxx11::basic_string<char>::iterator, __gnu_cxx::__alloc_traits<std::allocator<char>, char>::value_type&)'
   32 |                 temp[j][l] = find(query[i].begin(),query[i].end(), tango[j][l]);
      |                              ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
                 from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:32:34: note:   '__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char> >' is not derived from 'std::istreambuf_iterator<_CharT>'
   32 |                 temp[j][l] = find(query[i].begin(),query[i].end(), tango[j][l]);
      |                              ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:39:39: error: invalid types 'int[int]' for array subscript
   39 |                 if(temp[tangoFocus[i]][j]<temp[l][j] && tempFlag[l]==0 && l!=tangoFocus[i]){
      |                                       ^
a.cc:39:50: error: invalid types 'int[int]' for array subscript
   39 |                 if(temp[tangoFocus[i]][j]<temp[l][j] && tempFlag[l]==0 && l!=tangoFocus[i]){
      |                                                  ^