I know its probably b/c of a dangling pointer right?
But I dont understand why. If I comment out the call to remove duplicates, it compiles then gives segmentation fault in console.
I built it and it ran fine for me (Visual Studio 2005).
I know its probably b/c of a dangling pointer right?
Yeah, it's probably because the five Node pointers weren't de-allocated. It's probably implementation specific in terms of whether or not to raise an error if memory is left on the heap on program termination. If you delete the five Node*s does the segmentation fault go away?