title: error conversion to non-scalar type requested
body: <p>My errors:</p>
  
  <blockquote>
    <p>In file included from Main.cpp:18:<br>
    QuickSort.h: In member function <code>'void CQuickSort&lt;T&gt;::Partition(std::vector&lt;T, std::allocator&lt;_CharT&gt; &gt;*, int, int, int) [with T = CMoviePointer]'</code>:<br>
    QuickSort.h:49:   instantiated from <code>'void CQuickSort&lt;T&gt;::Sort(std::vector&lt;T, std::allocator&lt;_CharT&gt; &gt;*) [with T = CMoviePointer]'</code><br>
    Main.cpp:70:   instantiated from here<br>
    QuickSort.h:31: error: conversion from <code>'std::vector&lt;CMoviePointer, std::allocator&lt;CMoviePointer&gt; &gt;'</code> to non-scalar type <code>'CMoviePointer'</code> requested<br>
    QuickSort.h:49:   instantiated from <code>'void CQuickSort&lt;T&gt;::Sort(std::vector&lt;T, std::allocator&lt;_CharT&gt; &gt;*) [with T = CMoviePointer]'</code><br>
    Main.cpp:70:   instantiated from here<br>
    QuickSort.h:35: error: no match for <code>'operator='</code> in <code>'*(p_vec + ((long unsigned int)(((long unsigned int)upper) * 24ul))) = temp'</code><br>
    /usr/include/c++/4.4/bits/vector.tcc:156: note: candidates are: <code>std::vector&lt;_Tp, _Alloc&gt;&amp; std::vector&lt;_Tp, _Alloc&gt;::operator=(const std::vector&lt;_Tp, _Alloc&gt;&amp;) [with _Tp = CMoviePointer, _Alloc = std::allocator&lt;CMoviePointer&gt;]</code>  </p>
  </blockquote>
  
  <p>And Here is my program. </p>
  
  <pre><code>#ifndef _QUICKSORT_H_
  #define _QUICKSORT_H_
  
  #include &lt;vector&gt;
  
  template&lt;class T&gt;
  class CQuickSort{
  public:
      void Partition(std::vector&lt;T&gt; *p_vec, int upper, int lower, int size){
          if (size &lt;2)
              return;
  
          int pivot_index = size/2;
  
          pivot_index += lower;
  
          while(lower &lt; upper){ //do until start and end of list meet
              while(p_vec[lower] &lt; p_vec[pivot_index]){
                  lower--;
              }
  
              while(p_vec[pivot_index] &lt; p_vec[upper]){
                  upper--;
              }
  
              T temp = p_vec[lower];
  
              p_vec[lower] = p_vec[upper];
  
              p_vec[upper] = temp;  //swap upper and lower until lower is equal to or 
          }
      }
  
      void Sort(std::vector&lt;T&gt; *p_vec){
          int size = p_vec-&gt;size();
  
          if(size &lt; 2)
              return;
  
          Partition(p_vec,0, size-1, size);
      }
  };
  
  #endif
  </code></pre>
  
  <p>I'm at my wits end. I don't know what I'm doing wrong or where the actual problem is. any help is greatly appreciated</p>