title: C++ Find struct in list using a string item?
body: <p>I'm very new to c++ and I'm trying to figure how to find a struct inside a list using a string.</p>
  
  <p>I have a struct like this:</p>
  
  <pre><code>struct entrada {
    string token;
    string lexema;
    string tipo;
  };
  </code></pre>
  
  <p>and a list:</p>
  
  <pre><code>list&lt;entrada&gt; simbolos;
  </code></pre>
  
  <p><em>Insert here some 'entrada' in 'simbolos'</em></p>
  
  <p>Let's say I want to search for a 'entrada' with a certain 'lexema', and cout the other strings. Is there a simple way to do this? Like a function or something. I did it using while/for, but it isn't how I want to do.</p>