title: Using the function "find", of a set of struct, by passing just one attribute of the struct?
body: <p>Is it possible to use the function "find", of a set of struct, by passing just one attribute of the struct?</p>
  
  <p>The structs and the operators &lt; are defined below:</p>
  
  <pre><code>struct ARCO_TEMPO {
      Arco a;
      int slotTimeU; // momento que sai do vertice u do arco
      int slotTimeV; // momento que chega no vertice v do arco
      int order;
      ARCO_TEMPO () {};
      ARCO_TEMPO (const ARCO_TEMPO&amp; obj): a(obj.a), slotTimeU(obj.slotTimeU), slotTimeV(obj.slotTimeV), order(obj.order) {};
      ARCO_TEMPO (Arco _a, int _slotTimeU, int _slotTimeV, int _order) : a(_a), slotTimeU(_slotTimeU), slotTimeV(_slotTimeV), order(_order) {}    
  
  };
  
  struct PATH {
  
      set&lt;ARCO_TEMPO&gt; rota;
      float COST;
  
  };
  
  bool operator&lt;(const ARCO_TEMPO&amp; obj1, const ARCO_TEMPO&amp; obj2) {
      if (obj1.slotTimeU &lt; obj2.slotTimeU) {
          return true;
      }
      else {
          if (obj1.slotTimeU == obj2.slotTimeU &amp;&amp; obj1.slotTimeV &lt; obj2.slotTimeV) {
              return true;
          }
          else {
              if (obj1.slotTimeU == obj2.slotTimeU &amp;&amp; obj1.slotTimeV == obj2.slotTimeV &amp;&amp; obj1.a.i &lt; obj2.a.i) {
                  return true;
              }
              else {
                  if (obj1.slotTimeU == obj2.slotTimeU &amp;&amp; obj1.slotTimeV == obj2.slotTimeV &amp;&amp;obj1.a.i == obj2.a.i &amp;&amp; obj1.a.j &lt; obj2.a.j ) {
                      return true;
                  }
                  else{ 
                      return false;
                  }
              }
          }
  
  bool operator&lt;(const PATH&amp; obj1, const PATH&amp; obj2) {
      if (obj1.COST &lt; obj2.COST) {
          return true;
      }
      else {
          if (obj1.COST == obj2.COST &amp;&amp; obj1.rota &lt; obj2.rota) {
              return true;
          }
          else{ 
              return false;
          }
      }
  }
  </code></pre>
  
  <p>I have a variable PATH, called as aux_p. Then I have the attribute rota of this PATH (aux_p.rota). I want to find the "position" in the set rota (aux_p.rota), in which the attribute order is equal a specific value.</p>
  
  <p>I tried the lines below, but it doesn't work:</p>
  
  <pre><code>set&lt;ARCO_TEMPO&gt;::iterator it;
  int orderAux = aux_p.rota.size();
  it = aux_p.find(it-&gt;orderAux)
  </code></pre>
  
  <p>How can I use a second container unordered_map to this works?<br>
  Could anyone help me, please? </p>