Compiler output
prog.cpp: In function 'int main()':
prog.cpp:19:27: warning: array subscript has type 'char' [-Wchar-subscripts]
for(auto c : chars) Pos[c] = p++;
^
prog.cpp:29:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i = 0; i < Words.size(); ++i) {
^
prog.cpp:30:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if(Positions[i] < Words[i].size()) {
^
prog.cpp:32:16: warning: array subscript has type 'char' [-Wchar-subscripts]
Cnt[Pos[now]] += 1;
^
prog.cpp:37:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i = 1; i < chars.size(); ++i)
^
prog.cpp:45:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i = 0; i < Words.size(); ++i) {
^
prog.cpp:46:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if(Positions[i] < Words[i].size()) {
^
prog.cpp:48:15: warning: array subscript has type 'char' [-Wchar-subscripts]
if(Pos[now] == best) ++ Positions[i];
^
ver.cpp: In function 'int main(int, char**)':
ver.cpp:55:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int j=0; j<s[i].size(); ++j) {
^
ver.cpp: At global scope:
ver.cpp:41:14: warning: unused parameter 'argc' [-Wunused-parameter]
int main(int argc, char *argv[]) {
^