#include"reg52.h" typedef unsigned char uchar; uchar num1[]={1,3,5,7}; uchar num2[]={2,4,6}; main() { uchar result; uchar func1(); result=func1(num1,num2);(出错) while(1); } uchar func1(uchar *p1,uchar *p2) { return(*(p1+2)^*(p2+1)); } 用KEILC51,uV3版本,出现error C267: 'func1': requires ANSI-style prototype,我看不出毛病呀,调用FUNC1前我先函数说明uchar func1()再调用; 。若把FUNC1函数放到MAIN()前,再删除函数说明uchar func1();就没问题?刚用到C,见笑! |