Why Assignment not work?

why res[i]=s[j][k+1]; and res[i]=s[j][k-1];
not works