Compiler output
prog.cpp: In function 'int main()':
prog.cpp:14:11: warning: array subscript has type 'char' [-Wchar-subscripts]
poz[s[o]].x = 1;
^
prog.cpp:15:11: warning: array subscript has type 'char' [-Wchar-subscripts]
poz[s[o]].y = i;
^
prog.cpp:20:11: warning: array subscript has type 'char' [-Wchar-subscripts]
poz[s[o]].x = 2;
^
prog.cpp:21:11: warning: array subscript has type 'char' [-Wchar-subscripts]
poz[s[o]].y = i;
^
prog.cpp:26:11: warning: array subscript has type 'char' [-Wchar-subscripts]
poz[s[o]].x = 3;
^
prog.cpp:27:11: warning: array subscript has type 'char' [-Wchar-subscripts]
poz[s[o]].y = i;
^
prog.cpp:33:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i = 0 ; i < s.length(); i++)
^
prog.cpp:35:32: warning: array subscript has type 'char' [-Wchar-subscripts]
ans += min(abs(poz1x-poz[s[i]].x) + abs(poz1y-poz[s[i]].y),abs(poz2x-poz[s[i]].x) + abs(poz2y-poz[s[i]].y));
^
prog.cpp:35:57: warning: array subscript has type 'char' [-Wchar-subscripts]
ans += min(abs(poz1x-poz[s[i]].x) + abs(poz1y-poz[s[i]].y),abs(poz2x-poz[s[i]].x) + abs(poz2y-poz[s[i]].y));
^
prog.cpp:35:80: warning: array subscript has type 'char' [-Wchar-subscripts]
ans += min(abs(poz1x-poz[s[i]].x) + abs(poz1y-poz[s[i]].y),abs(poz2x-poz[s[i]].x) + abs(poz2y-poz[s[i]].y));
^
prog.cpp:35:105: warning: array subscript has type 'char' [-Wchar-subscripts]
ans += min(abs(poz1x-poz[s[i]].x) + abs(poz1y-poz[s[i]].y),abs(poz2x-poz[s[i]].x) + abs(poz2y-poz[s[i]].y));
^
prog.cpp:36:25: warning: array subscript has type 'char' [-Wchar-subscripts]
if (abs(poz1x-poz[s[i]].x) + abs(poz1y-poz[s[i]].y) < abs(poz2x-poz[s[i]].x) + abs(poz2y-poz[s[i]].y))
^
prog.cpp:36:50: warning: array subscript has type 'char' [-Wchar-subscripts]
if (abs(poz1x-poz[s[i]].x) + abs(poz1y-poz[s[i]].y) < abs(poz2x-poz[s[i]].x) + abs(poz2y-poz[s[i]].y))
^
prog.cpp:36:75: warning: array subscript has type 'char' [-Wchar-subscripts]
if (abs(poz1x-poz[s[i]].x) + abs(poz1y-poz[s[i]].y) < abs(poz2x-poz[s[i]].x) + abs(poz2y-poz[s[i]].y))
^
prog.cpp:36:100: warning: array subscript has type 'char' [-Wchar-subscripts]
if (abs(poz1x-poz[s[i]].x) + abs(poz1y-poz[s[i]].y) < abs(poz2x-poz[s[i]].x) + abs(poz2y-poz[s[i]].y))
^
prog.cpp:38:20: warning: array subscript has type 'char' [-Wchar-subscripts]
poz1x = poz[s[i]].x;
^
prog.cpp:39:20: warning: array subscript has type 'char' [-Wchar-subscripts]
poz1y = poz[s[i]].y;
^
prog.cpp:42:21: warning: array subscript has type 'char' [-Wchar-subscripts]
poz2x = poz[s[i]].x;
^
prog.cpp:43:21: warning: array subscript has type 'char' [-Wchar-subscripts]
poz2y = poz[s[i]].y;
^