If I have the next function
Stack *construct_stack(void) {
Stack *instance = (Stack *) malloc(sizeof(Stack));
// Stuff...
return instance;
}
It's sort of "constructor". But I'v been having problems with the "destructor".
If I do this I get an error.
void destruct_stack(Stack **st) {
// Stuff...
free(st);
}
Some idea?