跪求一道c语言题目

[复制链接]
查看11 | 回复2 | 2010-11-26 19:21:36 | 显示全部楼层 |阅读模式
求一组数最大值(用数组和调用函数做)
#include
void main()
{
int F(int);
/*函数的声明*/
int i,t;
int m[10];
for(i=0;if[i+1])
{

t=f;

f=f[i+1];

f[i+1]=t;
}
t=f[9];
return t;
}
error C2664: 'F' : cannot convert parameter 1 from 'int [10]' to 'int'

This conversion requires a reinterpret_cast, a C-style cast or function-style cast
Error executing cl.exe.
这是什么意思???

回复

使用道具 举报

千问 | 2010-11-26 19:21:36 | 显示全部楼层
如图所示
回复

使用道具 举报

千问 | 2010-11-26 19:21:36 | 显示全部楼层
int F(int f[10])========》int F(int * f)
回复

使用道具 举报

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

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行