J
Joah Senegal
Hello all,
I've them following C-code wich I need to compile with a c++ compiler. This
is only one error, but I'm trying to fix it for days now, without any
result. It's about the following line:
node *n = malloc(sizeof(node));
This is the complete code of the method
node *list_add(node **p, int i) {
node *n = malloc(sizeof(node));
n->next = *p;
*p = n;
n->data = i;
return n;
}
Anyone has a solution for this problem?
Thanks!
I've them following C-code wich I need to compile with a c++ compiler. This
is only one error, but I'm trying to fix it for days now, without any
result. It's about the following line:
node *n = malloc(sizeof(node));
This is the complete code of the method
node *list_add(node **p, int i) {
node *n = malloc(sizeof(node));
n->next = *p;
*p = n;
n->data = i;
return n;
}
Anyone has a solution for this problem?
Thanks!