Function callback problems

Everything else.

Function callback problems

Postby samad_lotia » Sun Mar 24, 2002 6:00 pm

I have written a sorting function for an expandable array in C++. One parameter for the sorting function is a pointer to a function that the user supplies. This user-defined function compares individual elements in the array and is called many times throughout the lifespan of the sorting function. I noticed that sometimes the program crashes with a SIGBUS and sometimes it works fine with *no* change whatsoever with the code or anything else. The only change is that the comparison function's location in memory is changed, which is normal. Can anybody help me with this?
samad_lotia
 
Posts: 12
Joined: Mon Feb 11, 2002 8:00 pm

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 9 guests

cron