samad_lotia
Junior Member
Member # 319
|
posted March 24, 2002 10:00 AM
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
|