CompuServe Messages

#Porting Database

    10-Jun-93 15:33:21
Fm: Syndesis 76004,1763
To: ron stein 73300,2074
I'm not sure I can see the problem, it may be elsewhere. The 'i = *((unsigned char *) keya) ++;' means "cast pointer keya to be a pointer to an unsigned char (instead of the char * it was) and then retrieve the byte value from where it pointed, treat it as an unsigned char integer, convert to int, assign to i, then increment the pointer keya." Maybe the cast of keya is the problem, it doesn't like the fact that you've changed it to an unsigned char and then expected to increment it. There's a logical flaw in this program, which I'd suggest you'd clean up later. You need to determine if 'char *keya' should be 'unsigned char' or just plain 'char'. From this code fragment, it looks like the program expects to store unsigned integers in the range 0..255 in those bytes where 'keya' might point. Therefore, I'd suggest changing it to 'unsigned char *keya' and removing the other casts.