title: C++ Return indexes of lowest values in array
body: <p>I'm trying to return indexes of lowest values in an array, and i'm unable to find a good solution anywhere.</p>
  <pre><code>int indexofSmallestElement(double array[], int size)
  {
      int index = 0;
  
      for(int i = 1; i &lt; size; i++)
      {
          if(array[i] &lt; array[index])
              index = i;              
      }
  
      return index;
  }
  </code></pre>
  <p>This is the probably the simplest way of finding index of one value, but what if I have multiple lowest values in an array?</p>