I'm constructing an unsigned char *
in c and I want to know how I finish it. So usually at the end of my memories I put '\0'
but unsigned char recognize it as a 0.
so when I do something like that :
void complement(unsigned char *c, int n){
while(*c!='\0'){
printf("%d\n", n-(*c));
c++;
}
}
it stop when I read "0" (and when I read 0 I want to print n, the complement)
So what can I use to have a proper ending condition to my while ?