title: Sorting string array with numbers C++
body: <p>I have problem solving this problem.
  The task is simple at first line I enter how many examples I have. 
  On second line I need to enter how many numbers im going to read.
  and then we enter all the numbers separate by space.
  The task itselfs do , sorting the string array wtih numbers from smalles to the biggest one. After that if we have even numbers entered we print the middle number -1, if they are uneven we just print the middle number.</p>
  
  <p>So far if I use the exact same code with long long it works perfectly , but it is limited only to 19 digit number and I want to expand the program so it can use bigger numbers.</p>
  
  <p>Using that way the sort func , when I try to sort 16 elements from 160 to 10 , they all messed it start from 110 then in the midle is 160 and so one , which makes absolutly non sense,  using 5 numbers or 8 works perfectly w/o any problem , using more numbers fails.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;algorithm&gt;
  #include &lt;string&gt;
  
  using namespace std;
  
  
  
  
  int main() {
  int examples;
  cin &gt;&gt; examples;
  for (size_t i = 0; i &lt; examples; i++)
  {
      long long unsigned int  n;
      cin &gt;&gt; n;
      string * numbers = new string[n];
      for (size_t i = 0; i &lt; n; i++)
      {
          cin &gt;&gt; numbers[i];
      }
  
      sort(numbers, numbers + n);
  
      if (n % 2 == 0) {
          cout &lt;&lt; numbers[n / 2 - 1];
      }
      else
          cout &lt;&lt; numbers[n / 2];
  
  
  
  }
  
  system("pause");
  return 0;
  }
  </code></pre>