title: C++: Lexicographic comparing strings using operators
body: <p>As I understand it if I compare two strings using the operators like the lesser-than (&lt;) C++ will compare them Lexicographically. I´d like to take advantage of this searching through a array and return the smallest lexicographic value. And for than I am using a temporary value for finding the smallest one <code>string smallest</code>. </p>
  
  <p>As you see I´ve given it the value <code>z</code>. What is the letter/symbol with the highest lexicographic value? is there any static variable That is already defined I can assign it to in C++?. What is the norm when doing this?</p>
  
  <pre><code>string VectorPQueue::extractMin() {
      string smallest = "z";
      int *count = new int;
      if (elems.size() != 0) {
          for (int i = 0; i &lt; elems.size(); i++)
          {
              if ((elems.get(i)) &lt; smallest) {
                  smallest = elems.get(i);
                  *count = i;
              }
          }
  
      } else {
          ErrorException("ERROR: pqueue is empty.");
          return "";
      }
  
      elems.remove(*count);
      printElements();
      return smallest;
  }
  </code></pre>