I have a problem with my code, it seems to fail in a weird way in release mode, debug mode works just fine. I am out of ideas and clues. I would like to get a direction for what should i do. So here is the problematic code:
static inline void FindPoint(Line *First,AABB *Second,point *Pt,int direction)
{
std::vector<point*> pntvec; ... }
When i call function FindPoint it is all fine and everything is set well. But when i reach the vector initialization the First pointer is reset to the same address as the vector. That causes unexpected behavior. So i thought the problem was in the commonalities. Both Line and the vector are using the point structure. Yet i was not able to find anything unusual. here are the structures
typedef struct
{
double x;
double y;
}point;
typedef struct
{
double incline;
double y;
double x;
double c;
point start,finish;
}Line;
And here is the initialization of the data sent to parameter First:
Line *objvec = new Line;
so what could be the problem can any one tell? Thank you in advance
Edit: A better look at the code http://pastebin.com/rki7EdM6