foo.cpp: In function 'int constr(int, int)':
foo.cpp:28:17: warning: array subscript has type 'char' [-Wchar-subscripts]
if (!ch[x][c]) {
^
foo.cpp:31:16: warning: array subscript has type 'char' [-Wchar-subscripts]
ch[x][c] = count++;
^
foo.cpp:33:66: warning: array subscript has type 'char' [-Wchar-subscripts]
for (; s[i + 1] && s[i + 1] != 'B'; i = constr(i + 1, ch[x][c]));
^
foo.cpp: In function 'int process(int, int)':
foo.cpp:151:34: warning: array subscript has type 'char' [-Wchar-subscripts]
BIT::modify(Graph::st[ch[x][c]] + 1, 1);
^
foo.cpp:152:67: warning: array subscript has type 'char' [-Wchar-subscripts]
for (; s[i + 1] && s[i + 1] != 'B'; i = process(i + 1, ch[x][c]));
^
foo.cpp:157:38: warning: array subscript has type 'char' [-Wchar-subscripts]
BIT::modify(Graph::st[ch[x][c]] + 1, -1);
^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\algorithm:62:0,
from foo.cpp:3:
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h: In instantiation of '_RandomAccessIterator std::__unguarded_partition(_RandomAccessIterator, _RandomAccessIterator, const _Tp&) [with _RandomAccessIterator = Query*; _Tp = Query]':
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h:2307:70: required from '_RandomAccessIterator std::__unguarded_partition_pivot(_RandomAccessIterator, _RandomAccessIterator) [with _RandomAccessIterator = Query*]'
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h:2338:54: required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size) [with _RandomAccessIterator = Query*; _Size = int]'
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h:5475:36: required from 'void std::sort(_RAIter, _RAIter) [with _RAIter = Query*]'
foo.cpp:179:23: required from here
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h:2269:19: error: passing 'const Query' as 'this' argument of 'bool Query::operator<(const Query&)' discards qualifiers [-fpermissive]
while (__pivot < *__last)
^