title: Quick Sort (can't Passing the result)
body: <p>I am absolutely HORRIBLE at passing functions, and even more so with passing arrays.I've problem with my code, I use Quick Sort for sorting my data from External File. The Function can't passing the sort result. </p>
  
  <p>UPDATE : The Function can passing the sort but, sorting in small to big, I want sort big to small , how to do that ?</p>
  
  <p>But if I use simple sorting Like</p>
  
  <pre><code>int temp_score;
      string temp_name;
      for(int j=0;j&lt;100;j++)
      {
          for(int k=0;k&lt;100;k++)
          {
              if(score[j]&gt;score[k])
              {
                  temp_score=score[j];
                  score[j]=score[k];
                  score[k]=temp_score;
                  temp_name=name[j];
                  name[j]=name[k];
                  name[k]=temp_name;
              }
          }
      }
  </code></pre>
  
  <p>No problem with simple sorting.</p>
  
  <pre><code>void quicksort(int score[],string name[],int kiri,int kanan){
  int temp_score=0,i=kiri,j=kanan;
  int pivot = score[(kiri+kanan)/2];
  string temp_name;
  //Pengurutan data berdasar Pivot
  while (i &lt;= j){
      while (score[i]&lt;pivot){
          i++;
      }while (score[j]&gt;pivot){
          j--;
      }if (i &lt;= j){
                  temp_score=score[i];
                  score[i]=score[j];
                  score[j]=temp_score;
                  temp_name=name[i];
                  name[i]=name[j];
                  name[j]=temp_name;
                  i++;
                  j--;
      }
  }
  //Rekursif
  if (kiri&lt;j){
      quicksort(score,name,kiri,j);
  }if (i&lt;kanan){
      quicksort(score,name,i,kanan);
  }
  }
  
  int main (){
  string name[100];
  int score[100];
  int i=0;
      for (int i=0;i&lt;100;i++)
      {
          name[i]="";
          score[i]=0;
      }
      ifstream highscore;
      highscore.open("highscore.txt");
      while(!highscore.eof())
      {
          getline(highscore,name[i]);
          highscore &gt;&gt; score[i];
          highscore.ignore(100,'\n');
          i++;
      }
  
      quicksort(score,name,0,99);
      cout&lt;&lt;"\tNAMA\t\t|\t\tSCORE\t\t"&lt;&lt;endl;
      cout&lt;&lt;"========================================================"&lt;&lt;endl;
      for(int m=0;m&lt;25;m++)
      {
          cout&lt;&lt;name[m]&lt;&lt;"\t\t\t\t"&lt;&lt;"Rp "&lt;&lt;score[m]&lt;&lt;endl;
      }
      }
  </code></pre>