标签:错误 with return china for 成功 ges git highlight
#include<stdio.h> int fun(int *p); int main() { int fun(int *p); int a[10]={1,2,3,4,5,6,7,8,9,0}; int *i; for(int j=0;j<10;j++) { i=&a[j]; printf("a[%d]=",j); fun(i); } } int fun(int *p) { printf("%d\n",*p); }
a[0]=1 a[1]=2 a[2]=3 a[3]=4 a[4]=5 a[5]=6 a[6]=7 a[7]=8 a[8]=9 a[9]=0 -------------------------------- Process exited after 0.004806 seconds with return value 0 请按任意键继续. . .
总结:在主函数之前声明了fun函数,但在主函数开头忘记声明,导致出现一次错误,修改后编译成功。随着联系增多,编写代码越来越熟练,还需多加练习。
Git地址:http://git.oschina.net/Kakyoin
571453471@qq.com
标签:错误 with return china for 成功 ges git highlight
原文地址:http://www.cnblogs.com/Kakyoin/p/6666354.html