Main.cpp:8:23: error: 'std::map<char, std::vector<int> > index' redeclared as different kind of entity
8 | map<char,vector<int>> index;
| ^~~~~
In file included from /usr/include/string.h:462,
from /usr/include/c++/11/cstring:42,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:48,
from Main.cpp:1:
/usr/include/strings.h:61:1: note: previous declaration 'const char* index(const char*, int)'
61 | index (const char *__s, int __c) __THROW
| ^~~~~
Main.cpp: In function 'int main()':
Main.cpp:18:22: error: invalid types '<unresolved overloaded function type>[char]' for array subscript
18 | index[A[i]].push_back(i);
| ^
Main.cpp:20:22: error: unable to deduce 'auto&&' from 'index'
20 | for (auto pr:index){
| ^~~~~
Main.cpp:20:22: note: couldn't deduce template parameter 'auto'
Main.cpp:22:28: error: invalid types '<unresolved overloaded function type>[char]' for array subscript
22 | int l=index[c].size();
| ^
Main.cpp:24:42: error: invalid types '<unresolved overloaded function type>[char]' for array subscript
24 | L.push_back(index[c][i]);
| ^
Main.cpp:25:42: error: invalid types '<unresolved overloaded function type>[char]' for array subscript
25 | R.push_back(index[c][l-1-i]);
| ^