Mam napisać bubblesorta w funkcji i po napisaniu nie moge skompilować kodu. Pomóżcie lub napiszcie gdzie robie błąd lub jak go rozwiązać.
#include <iostream>
#include <cstdlib>
#include <cstdio>
using namespace std;
void Sortowanie( int tab[], int size )
{
for( int i = 0; i < size; i++ )
{
for( int j = 0; j < size - 1; j++ )
{
if( tab[ j ] > tab[ j + 1 ] )
swap( tab[ j ], tab[ j + 1 ] );
}
}
}
int main()
{
int tab[10];
for(int i=0;i<10;i++)
{ cout<<"Wpisz Liczbe"<<endl;
cin>>tab[i];
}
cout<<Sortowanie(int tab[10]);
system("PAUSE");
return 0;
}