Compiler output
prog.cpp: In function 'int Dist(char, char)':
prog.cpp:16:18: warning: array subscript has type 'char' [-Wchar-subscripts]
return abs(let[a].x - let[b].x) + abs(let[a].y - let[b].y);
^
prog.cpp:16:29: warning: array subscript has type 'char' [-Wchar-subscripts]
return abs(let[a].x - let[b].x) + abs(let[a].y - let[b].y);
^
prog.cpp:16:45: warning: array subscript has type 'char' [-Wchar-subscripts]
return abs(let[a].x - let[b].x) + abs(let[a].y - let[b].y);
^
prog.cpp:16:56: warning: array subscript has type 'char' [-Wchar-subscripts]
return abs(let[a].x - let[b].x) + abs(let[a].y - let[b].y);
^
prog.cpp: In function 'int main()':
prog.cpp:22:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < S.size(); i++)
^
prog.cpp:23:11: warning: array subscript has type 'char' [-Wchar-subscripts]
let[S[i]].x = 0, let[S[i]].y = i;
^
prog.cpp:23:28: warning: array subscript has type 'char' [-Wchar-subscripts]
let[S[i]].x = 0, let[S[i]].y = i;
^
prog.cpp:26:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < S.size(); i++)
^
prog.cpp:27:11: warning: array subscript has type 'char' [-Wchar-subscripts]
let[S[i]].x = 1, let[S[i]].y = i;
^
prog.cpp:27:28: warning: array subscript has type 'char' [-Wchar-subscripts]
let[S[i]].x = 1, let[S[i]].y = i;
^
prog.cpp:30:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < S.size(); i++)
^
prog.cpp:31:11: warning: array subscript has type 'char' [-Wchar-subscripts]
let[S[i]].x = 2, let[S[i]].y = i;
^
prog.cpp:31:28: warning: array subscript has type 'char' [-Wchar-subscripts]
let[S[i]].x = 2, let[S[i]].y = i;
^
prog.cpp:41:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < S.size(); i++)
^
prog.cpp:43:19: warning: array subscript has type 'char' [-Wchar-subscripts]
conf[i % 2][S[i]] = INF;
^
prog.cpp:46:19: warning: array subscript has type 'char' [-Wchar-subscripts]
conf[i % 2][last] = INF;
^
prog.cpp:58:19: warning: array subscript has type 'char' [-Wchar-subscripts]
conf[i % 2][last] = best;
^
prog.cpp:45:24: warning: variable 'le' set but not used [-Wunused-but-set-variable]
int best = INF; char le;
^