I am getting the following type of error. I know it has something to do with me improperly accessing memory, but I don\'t exactly how. Please help me see where I have gone wrong
It looks like you are trying to free memory that has already been freed or was dereferenced.
Link your program with efence or run it with valgrind.
This will tell you where your pointer gets dereferenced.