程序检错?

[复制链接]
查看11 | 回复1 | 2008-11-29 01:03:31 | 显示全部楼层 |阅读模式
structstudent{
char num[8];
char name[10];
short grade;
};
void Input Sdudent a[], int n;
void SelectSort(int a[], int n);
void SelectSort(char * a[], int n);
void SelectSor(Student a[], intn);
bool oprator>(Student& r1, Student& r2);
void Output(int a[], int n);
void Output(char* a[], int n);
void Output(studenta[], int n);
#include
#include
#include"HeadFile.h"
void Input(Student a[], int n);
couta.num>>a.grade;
}
couta[k]) k=j;
Student x=a[i-1]; a[i-1]=a[k];a[k]=x;
}
}
bool operator>(student& r1, student& r2)
{
if(r1.grade>r2.grade) return 1;
else return 0;
}
void SelectSort(int a[], int n)
{
int i, j;
for (i=1;i<n;i++)
{
int k=i-1;
for(j=i;j<n;j++) if(a[j]<a[k]) k=j;
int x=a[i-1];a[i-1]=a[k];a[k]=x;
}
void SelectSort(char *a[],int n)
{
int i,j;
for (i=1;i<n;i++)
{
int k=i-1;
for(j=i;j<n;j++) if(strcmp(a[],a[k]<0) k=j;
char*x=a[i-1];a[i-1]=a[k];a[k]=x;
}
}
#include
#include"HeadFile.h"
void main()
{
int a[8]={34,78,25,10,66,48,32,84};
char *b[6]={"JANUARY","FEBRUARY","MARCH","APRLL","MAY","JUNE"};
Sdudent c[6];
Input(c,6);
SelectSort(a,8);
SelectSort(b,6);
SelectSort(c,6);
Output(a,8);
Output(b,6);
Output(c,6);
}
程序第六行报六个错,我就是找不出来,请各位大虾指教
谢谢!

回复

使用道具 举报

千问 | 2008-11-29 01:03:31 | 显示全部楼层
void Input Sdudent a[], int n; 这个函数名后面没加括号,student拼写错误,首字母的大小写也和结构体定义时的不一样...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行