selectionsort and average of students scores

I've been trying to do this program which I put it down. it always gives an error: cannot convert `double (*)[5]' to `int*' for argument `1' to `void sort(int*, double)'|

pleasee help mee!!!

that's my program:

#include <iostream>

const double size=9;
void sort(int grade[],double size);

using namespace std;
int main()
{ cout<<"st_number"<<" "<<"labs"<<" "<<"midtrm"<<" "<<"final"<<" "<<"c_grades"<<endl;
double grade[9][5]={{80702001,40,70,60,0},{80702002,90,80,60,0},{80702003,60,40,50,0},{80702004,40,50,60,0},{80702005,70,70,60,0},
{80702006,40,40,40,0},{80702007,50,40,90,0},{80702008,20,50,90,0},{80702009,52,55,60,0}};

int i,j;
for ( i=0; i<size; i++)
{cout <<"\n"<<" ";
for (j=0 ; j < 5 ; j++){
cout << grade [i][j]<<" " ;
}
grade[i][5]=grade[i][1]*35.0/100.0+grade[i][2]*25.0/100.0+grade[i][3]*40.0/100.0;
}
cout<<endl;

sort(grade,size);

cout<<"Sorting of the students:\n"<<endl;
for(int i=0;i<size;i++)
{
cout <<"\n"<<" ";
for (j=0 ; j < 5 ; j++){
cout << grade [i][j]<<" " ;

}}
return 0;
}

void sort(int grade[],double size)
{
int temp;
int biggest;

for(int i=0;i<size;i++)
{
biggest=i;
{
for(int j=i+1;j<size;j++)
{
if(grade[biggest]<grade[j])
{
biggest=j;
}
if(biggest !=i)
{
temp = grade[i];
grade[i] = grade[biggest];
grade[biggest] = temp;
}
}
}
}
}

The error says it all, just because it has special characters i.e. characters that are not letters or numbers, is no reason to panic. When you declare and define sort you are telling it to expect an int, but you are passing it a double. Fix that and you're good.
first of all thank you very much for your helping, but I didnt understand that what I must change b/c I have been studying on this project for a long time, but ,unfortuanetely, I couldnt find my error I converted int to double or double to int but always a fault. also I must do it double, b/c the averages are not int. could you say what I must fix, please??
void sort(int grade[],double size);

Should be

void sort(double grade[],double size);

And

void sort(int grade[],double size)
{...

Should be

void sort(double grade[],double size)
{


ohhh, I also did it , but if I do like that I have an extra warning(error: cannot convert `double (*)[5]' to `double*' for argument `1' to `void sort(double*, double) In function `void sort(double*, double) warning: converting to `int' from `double'|
||=== Build finished: 1 errors, 1 warnings )
the problem is not that,unfortunately:( what should I do??
Topic archived. No new replies allowed.