title: How to fix this bug on sorting an array?
body: <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  template &lt;class T&gt;
  T sortArray(T data[])
  {
    int arrsize = sizeof(data)/sizeof(T);
    int x,y,temp;
    for(y=0;y&lt;arrsize;y++)
    {
       for(x =0;x&lt;arrsize-y-1;x++)
       {
  
           if(data[x]&gt;data[x+1])
           {
               temp = data[x];
               data[x] = data[x+1];
               data[x+1] = temp;
  
           }
      }
  
   }
  
   return  data;
  
  }
  
  int main()
  {
     int x;
     int arr[] = {10,7,32,65,12,6};
     int sorted[] = sortArray(arr[]);
     for(x=0;x&lt;6;x++)
     {
         cout&lt;&lt;sorted[x]&lt;&lt;endl;
     }
  }
  </code></pre>
  
  <p>When i try to sort compile this code i get an error of </p>
  
  <pre><code>**abc\main.cpp:34: error: expected primary-expression before ']' token
   int sorted[] = sortArray(arr[]);
                                ^**
  </code></pre>
  
  <p>How to fix this bug . if i remove <strong>[]</strong> i get more errors</p>