I am trying to write a program that can create a polygon(of any number of sides) around a certain object and find the polygon\'s centroid . For this purpose, I opted to use
according to this :
Returning from function crashing, only after a certain point in the code
and my own experience (unfortunately) compiling the program in vs 2013 instead of 2015 or just changing the platform toolset to (v120) was enough for me to fix the bug