Assert(what argument does it take?)


what argument does assert take?

The argument from a library, states below, won't run since it doesn't like the assertion of the pointer below. Why is it?

1
2
 //returns the current waypoint
  Vector2D    CurrentWaypoint()const{assert(curWaypoint != NULL); return *curWaypoint;}
It's a macro not a function and it evaluates an expression. If that expression evaluates to 0 or 'false' the assertion fails.
The error I get is below, apparently the iterator won't recognise the template <Vector2D>, a class with the "!=" operator. Why is this?

Error	4	error C2678: binary '!=' : no operator found which takes a left-hand operand of type 'const std::_List_iterator<_Mylist>' (or there is no acceptable conversion)	c:\users\portsmouthuni\documents\artificial intelligence\matt buckland\vs8 projects\buckland_chapter3-steering behaviors\path.h	54
Last edited on
Topic archived. No new replies allowed.