error: pointer being freed was not allocated
问题 I am trying to overload the assignment operator to do a deep copy of a polygon object, the program compiles but I am getting an error toward the end that I want to clear up. Below is the relevant code, if you think I need to add more please just post a comment. Assume the proper #include 's and that the << operator is overloaded for proper output etc... The error is: malloc: * error for object 0x1001c0: pointer being freed was not allocated * set a breakpoint in malloc_error_break to debug. /