title: C++ A-star implementation -- determining whether a node is already in the priority queue of open items
body: <p>One step in the A* pathfinding algorithm requires searching the list of open nodes for the node you're currently interacting with, and adding that node to the list if it isn't already there, or updating its value and parent, if it's present but with a higher weight than the current version of the node.</p>
  
  <p>These behaviors aren't supported in the STL priority_queue structure. How should I implement that step?</p>
  
  <p><strong>Updates</strong> since this question is getting a lot of views:</p>
  
  <ul>
  <li><p>std::priority_queue may look like a good choice for this, but it isn't.</p></li>
  <li><p>Implementing A* yourself is an enormous confidence-booster, but after you've done it, you should try to switch to using the one provided by boost. I was nervous about installing it when I asked this question, but installation is very easy and won't produce any complications; and A* isn't the only useful functionality that boost provides. (In particular, if you don't use their string-processing functionality, you'll end up writing your own copy of it; I speak from personal experience...)</p></li>
  </ul>