From: Bryan Pope (bpope_at_wordstock.com)
Date: 2003-02-25 20:05:42
And thusly M Ancher spake: > > Hi again. > > I'm still in porting mode. :) > > This is the code i show my problem: > > ... > typedef struct WClassStruct { > struct WClassStruct **superClasses; // array of this classes superclasses > WClassA* firstPart; > WClassB* secondPart; > struct WClassStruct *nextClass; // next class in hash table linked list > } WClass; > ... > WClass *wclass, *superClass; > ... > xmemmove(wclass->superClasses, superClass->superClasses, size); > ... > > When I compile the line starting with "xmemmove", I get the error: > "Error: Incompatible pointer types". > > I assume it is the double stars (**) before "superClasses" that makes > the problem. I've never seen double stars in C before. Is there an > alternative way to code this? > The double stars are "pointers to pointers". Very useful when you have a list of strings (char *'s). I think if the line was: xmemmove (*(wclass->superClasses, *(superClass->superClasses), size); would fix the problem. Cheers, Bryan P.S. I am assuming that "xmemmove" has the same prototype as memmove (void *, void *, size_t) ---------------------------------------------------------------------- To unsubscribe from the list send mail to majordomo_at_musoftware.de with the string "unsubscribe cc65" in the body(!) of the mail.
This archive was generated by hypermail 2.1.3 : 2003-02-25 20:08:58 CET