Argh!!!!
I can't compile some linked-list code, and I'm sure it's due to my inexperience with pointers. The errors are:
clrusers.c(105): Warning! W102: Type mismatch (warning)
clrusers.c(105): Note! N2003: source conversion type is 'int '
clrusers.c(105): Note! N2004: target conversion type is 'struct _t_connList *'
My code snippit is:
typedef struct _t_connList {
WORD connection;
char username[MAX_DN_CHARS];
int isException;
struct _t_connList *next;
} t_connList;
int main(void)
{
t_connList *connList = NULL;
connList = getConnections(connList); // line 105 error!
return 0;
}
t_connList *getConnections(t_connList *connList)
{
// do stuff
return (connList);
}
-with thanks
I can't compile some linked-list code, and I'm sure it's due to my inexperience with pointers. The errors are:
clrusers.c(105): Warning! W102: Type mismatch (warning)
clrusers.c(105): Note! N2003: source conversion type is 'int '
clrusers.c(105): Note! N2004: target conversion type is 'struct _t_connList *'
My code snippit is:
typedef struct _t_connList {
WORD connection;
char username[MAX_DN_CHARS];
int isException;
struct _t_connList *next;
} t_connList;
int main(void)
{
t_connList *connList = NULL;
connList = getConnections(connList); // line 105 error!
return 0;
}
t_connList *getConnections(t_connList *connList)
{
// do stuff
return (connList);
}
-with thanks