I am getting really confused with all the pointers for a school assignment, and is unable to get help on a weekend.
I have a set of structs containing a number of different pointers:
typedef struct bucket *ListPtr;
typedef struct bucket *BucketPtr;
typedef struct conListNode *ListNodePtr;
typedef struct ipaddr
int digit1, digit2, digit3, digit4;
typedef struct bucket
typedef struct connctnList
typedef struct conListNode
When I use them in a function, eg:
int addConnection(connctnList *conList, IPAddress address, int port)
int hashValue = INITIALISE;
ListNodePtr current, previous, new;
if (position == NULL)
position = new; <---------------------------------------this line
I get this message for the line pointed to by an arrow:
"connctnList_HT.c:258: warning: assignment from incompatible pointer type"
I know it is because BucketPtr and ListNodePtr are different pointer types, but how can I re-structure the ADTs to resolve this.
Thanks in advance