This is driving me nuts.
OK. There are at least two errors in the attached code (the associated .h file has a few in too I am sure). I get the second when I eliminate most of the references to the array "nodes" which seems to be perfectly well defined (I can loop through it and printf its elements on screen) but any attempt to access its contents in the following manner:
results in a bus error.
I'm using gcc on a unix system and I'm completely exhausted from trying to work out what's wrong.
PS: please excuse all the diagnostic printf statements in the code!
Can you tell me which version of nodes gets allocated memory, and which one is in scope when you call sumarray?
int *oldtempnames, *newtempnames, *nodes, *c;
/* ... */
Hmmm! A schoolboy error! Now to fix that error in the deletethings subfunction! :)