I'm getting access violation error when I try to insert into vector. This is what I have, I'm getting access violation error when it tries to push_back() in the _Inside(..) function of vector.:
iPathSolver* getPathSolver(iPathnode* Location, iNode* actor)
{
PathSolver* s = new PathSolver(Location, actor);
solvers.push_back(s);
return (iPathSolver*)solvers.back();
}
class PathSolver : public iPathSolver
{
private:
iNode* actor;
Vector<float, 3> old_loc; //this is another class created by me..
iPathnode* next_loc;
std::vector<iPathnode*> pathChildren; //ArrayList is std::vector
iPathnode* current_Loc = nullptr; //3-4 iPathnodes
std::map<int, iPathnode*> openList; //3-4 maps
public:
PathSolver::PathSolver(iPathnode* Location, iNode* act)
{
current_Loc = Location;
destination = nullptr;
actor = act;
old_loc = current_Loc->getPosition();
next_loc = current_Loc;
}
//etc....
}
Aucun commentaire:
Enregistrer un commentaire