I’m writing a program for a “Set” data structure in C.
It’s working fine when one instance of Set is present, but it doesn’t work when two instances of Set are present.
Also my code for removing an element is not working when the candidate is the first element.
Can someone help me?
Here is the code:
First of all you passes pointer to set by value. I.e. instead of
use
or:
I’d advice re-reading chapter on pointers (don’t worry – they are considered hard but they are must for C programmers).