title: having error function not declared in bubble-sort program
body: <p>i am having some problem whlie compiling bubble sort program , it  gives me
  error: ‘bubblesort’ was not declared in this scope bubblesort(a,5);</p>
  <pre><code>#include&lt;iostream&gt;
  using namespace std;
  int main()
  {
    int a[]={12,34,8,45,11};
    int i;
    bubblesort(a,5);
    for(i=0;i&lt;=4;i++)
    cout&lt;&lt;a[i];
  }
  
  void bubblesort(int a[],int n)
  {
    int round,i,temp;
    for(round=1;round&lt;=n-1;round++)
    for(i=0;i&lt;=n-1-round;i++)
    if(a[i]&gt;a[i+1])
   {
     temp=a[i];
     a[i]=a[i+1];
     a[i+1]=temp;
    }
  }
  </code></pre>