I am trying to create a linked list in C but trying to pack it nicely in somewhat of a C++ style class. I am having some issues however using function pointers in C.
<
Well you can't add a default value in the declaration of the struct but what you can do is:
linkedList
instance - I guess you've seen that in C style librariesLike:
void addMSG(unsigned char *data, int size, struct linkedList *self);
struct linkedList {
int count;
struct msgNode *front;
struct msgNode *back;
void (*addMSG)(unsigned char *, int, struct linkedList *);
} DefaultList = {0, NULL, NULL, addMSG};