c语言指针的问题,C语言指针的问题

该楼层疑似违规已被系统折叠 隐藏此楼查看此楼

#include

#include

void main()

{

void input(float*q[6],int n);

void output(float*q[6],int n);

int n;

float a[20][6];

printf("please enter the number of the students.<=20\n");

scanf("%d",n);

printf("n=%d",n);

printf("please enter the scores of the students\n");

input(a,n);

system("cls");

printf("all the students'scores are as follow:\n");

output(a,n);

printf("\n");

}

void input(float*q[6],int n)

{

int i,j;for(i=0;i

{

printf("please enter the NO.i student's ID.\n");

scanf("%f",*(q+i));

printf("please enter this student's scores.\n");

for(j=1;j<=5;j++)

scanf("%f",*(q+i)+j);

}

}

void output(float*q[6],int n)

{

int i,j;

for(i=0;i

{

for(j=0;j<=5;j++) printf("%5d",*(*(q+i)+j));printf("\n");

}

}

错误提示是这样的: warning C4047: 'function' : 'float ** ' differs in levels of indirection from 'float [20][6]'warning C4024: 'input' : different types for formal and actual parameter 1

我不知道怎么改?麻烦帮一下忙。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值