A more sophisticated,object-oriented and difficult approach would be to create a Shape base class and use inheritance to create Triangle, Square, Hexagon, and Polygon subclasses. I haven't actually coded this approach so I can't speak to its difficulty or gotchas-- furthermore, I'm not sure how many of you have experience with inheritance in C++, so unless you've done everything else, I wouldn't even attempt to try this approach.
Send to back
that effectively
positions the topmost polygon behind all the other ones it overlaps. (You can achieve this by moving the
particular polygon to the front/back of your polygon vector/array).
*** CIS 41 Assignment 03 Submission
Furthermore, it's may be the case that your program will upon occasion crash. That's fine and is to be expected at an early stage of testing. When you submit your code, please indicate as much as possibly, the conditions that cause any failures.