Compiler output
prog.cpp: In function 'int dist(char, char)':
prog.cpp:21:23: warning: array subscript has type 'char' [-Wchar-subscripts]
return abs(point[A].x - point[B].x) + abs(point[A].y - point[B].y);
^
prog.cpp:21:36: warning: array subscript has type 'char' [-Wchar-subscripts]
return abs(point[A].x - point[B].x) + abs(point[A].y - point[B].y);
^
prog.cpp:21:54: warning: array subscript has type 'char' [-Wchar-subscripts]
return abs(point[A].x - point[B].x) + abs(point[A].y - point[B].y);
^
prog.cpp:21:67: warning: array subscript has type 'char' [-Wchar-subscripts]
return abs(point[A].x - point[B].x) + abs(point[A].y - point[B].y);
^
prog.cpp: In function 'int main()':
prog.cpp:65:34: warning: array subscript has type 'char' [-Wchar-subscripts]
d[i + 1][s[i + 1]][c2] = min(d[i + 1][s[i + 1]][c2], d[i][c1][c2] + dist(c1, s[i + 1]));
^
prog.cpp:65:63: warning: array subscript has type 'char' [-Wchar-subscripts]
d[i + 1][s[i + 1]][c2] = min(d[i + 1][s[i + 1]][c2], d[i][c1][c2] + dist(c1, s[i + 1]));
^
prog.cpp:66:38: warning: array subscript has type 'char' [-Wchar-subscripts]
d[i + 1][c1][s[i + 1]] = min(d[i + 1][c1][s[i + 1]], d[i][c1][c2] + dist(c2, s[i + 1]));
^
prog.cpp:66:67: warning: array subscript has type 'char' [-Wchar-subscripts]
d[i + 1][c1][s[i + 1]] = min(d[i + 1][c1][s[i + 1]], d[i][c1][c2] + dist(c2, s[i + 1]));
^