title: C++ undeclared identifier vector
body: <p>I have the following code for quick sort.
  When I compile the code it shows following errors:</p>
  
  <p>Error C2065: 'vector' :undeclared identifier<br>
  Error C2062: type int : unexpected<br>
  Error C3861: 'quicksort': identifier not found </p>
  
  <pre><code>#include "iostream"
  #include "conio.h"
  #include "vector"
  void quicksort(vector&lt;int&gt;,int,int);
  int partition(vector&lt;int&gt;,int,int);
  
  using namespace std;
  
  int main()
  {   vector&lt;int&gt; unsorted;
      int n,x,y;
  //cout&lt;&lt;"Initial size: "&lt;&lt;unsorted.size()&lt;&lt;"\n Capacity: "&lt;&lt;unsorted.capacity();
  cout&lt;&lt;"Enter the size: ";
  cin&gt;&gt;n;
  cout&lt;&lt;"Enter the elements in unsorted array: "&lt;&lt;endl;
  
  for(int a=0;a&lt;n;a++)
  {
      cin&gt;&gt;x;
          unsorted.push_back(x);
  }
  for(int b=0;b&lt;n;b++)
  {
  cout&lt;&lt;unsorted[b]&lt;&lt;"\t";
  }
  
  
  x=1;
  y=n;
   quicksort(unsorted,x,y); //quicksort(array,1,array.length)
  
   for(int m=0;m&lt;n;m++)
   {
   cout&lt;&lt;unsorted[m]&lt;&lt;"\t";
   }
   return 0;
  }
  
  
  int partition(vector&lt;int&gt; given,int p,int r)
  {
      int pivot,i,j;
      pivot=given[r];
      i=p-1;
      for(j=p;j&lt;r-1;j++)
      {
          if(given[j]&lt;pivot)
              i++;
          swap(given[i],given[j]);
      }
      swap(given[i+1],given[r]);
      return i+1;
  
  }
  
  void quicksort(vector&lt;int&gt; given,int p,int r)
  {   int q;
  
      if(p&lt;r)
  
       q= partition(given,p,r);
       quicksort(given,p,q-1);
       quicksort(given,q+1,r);
  }
  </code></pre>