Post New Topic  Post A Reply
my profile | register | search | faq | forum home
  next oldest topic   next newest topic
» MacOSX -   » General Discussion   » Function callback problems

UBBFriend: Email this page to someone!    
Author Topic: Function callback problems
Junior Member
Member # 319

posted March 24, 2002 10:00 AM      Profile for samad_lotia        Edit/Delete Post  Reply With Quote 
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?
Posts: 12 | Registered: Feb 2002  |  IP: Logged

All times are Pacific Time  

Post New Topic  Post A Reply Close Topic    Move Topic    Delete Topic next oldest topic   next newest topic
Hop To:

Contact Us |

Powered by Infopop Corporation
Ultimate Bulletin BoardTM