Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You need to study your C++ a bit more.

Point2f fourpts[4];//declares a local array.  Will be destroyed when it goes out of scope.
return fourpts;//Returns a pointer to the local array.  When the array is destroyed, the pointer now points to bad memory.