brewbuck, not too familiar with that, but I don't think I can because all the items in openlist are of class Node. What values I'm examining are private member integer variables that are returned with the "get_fval()" member function.
Well my openlist and iter are declared as such:
Code:
std::list<Node> openlist;
std::list<Node> closelist;
std::list<Node>::iterator iter;
Those are global variables.
And my Node class looks like this:
Code:
class Node
{
private:
Coord position;
int mvthru;
int fval;
bool start;
bool end;
Coord parent;
public:
Node(int,int);
Node();
~Node();
Coord get_pos(){return position;};
void set_pos(int x,int y){position.x=x;position.y=y;};
void set_movethrough(int val){mvthru=val;};
int get_movethrough(){return mvthru;};
void set_start(){start=true;};
void set_end(){end=true;};
bool is_start(){return start;};
bool is_end(){return end;};
void set_parent(Coord pos){parent.x=pos.x;parent.y=pos.y;};
Coord get_parent(){return parent;};
void set_fval(int f){fval=f;};
int get_fval(){return fval;};
};
Constructors/destructor omitted due to relevancy.
Yeah the lowest variable's initialization was just done for speed, I'll go back and make it nicer/faster but I'm just trying to get it up and running as of now. Thanks for all the replies.