"Heap corruption detected" Error
I have an assignment on pointers and chain structures.
Basically, we wrote a program that acts like flight ticketing system (add flight, add passenger, assign passenger to flight, delete flight from passenger data, etc.)
I wrote the code up to the part that I need to remove a flight from a passenger's flights record. I have un-linked the struct which I wanted to free (still keeping a temporary pointer pointing at its address) and when I try to free it, I get this HEAP error.
I read that it has got something to do with memory leak somewhere after the malloc() function but I really have no clue on how to debug this kind of problem.
I'll appreciate any advice...