I have a problem with this. Here’s the specific part of my C code:
unsigned char *p;
char s[1048];
int m[1048], r[2];
int e = 0, L = 0, mov = 0, ri, i;
for(*p = s; *p; ++p, mov += m[L++])
m[L] = min(*p - 'A', 'Z' - *p + 1);
Now i got the message – assignment makes integer from pointer without a cast. Please help me out.
sis an array of type char, you assign it to the dereferencedpwhich is a pointer of ‘unsigned char’. You cannot do this without castings:The code that you probably want is:
by incrementing
pin the for loop you go through all the values in the arrays