title: C++ Deleting a specfic value in a vector without knowing location
body: <pre><code>if (find(visitable.begin(), visitable.end(), ourstack.returnTop())) { ... }
  </code></pre>
  
  <p>I want to determine whether the top character in stack <code>ourstack</code> can be found in the vector <code>visitable</code>. If yes, I want this character to be deleted from <code>visitable</code>. </p>
  
  <p>How would I code that? I know vectors use <code>erase</code>, but that requires the specific location of that character (which I don't know).</p>
  
  <p>This is for my <a href="https://stackoverflow.com/questions/10763233/algorithm-to-print-to-screen-paths-through-a-text-maze">maze-path-finding assignment</a>.</p>
  
  <p>Also, my <code>returnTop</code> is giving me an error: <code>class "std.stack&lt;char..." has no member returnTop</code>. I declared #include  in the top of my program. What's happening here?</p>
  
  <p>Thanks in advance! </p>