when running my code in borland c 3.1 it works fine, but when running it on c-free it crashes at this line: while(ptr1->pright)
{
ptr1=ptr1->pright;
}
giving SIGSEGV, any logical reasons?
when running my code in borland c 3.1 it works fine, but when running
Share
You’re probably accessing memory outside the bounds of an array or which you didn’t allocate. As such, you triggered undefined behaviour, so pretty much anything can happen, including crashing or even apparently working fine.