Hello,all.
I have just writed a example for practice the key word "extern" which is used in aspect of function.
I typed it in a file that named main.c and the codes are shown as in following.
error info:
main.c:Code:/tmp/...... undefined reference 'ret'
test.cCode:#include <stdio.h> extern int ret(int); int main(void) { int i,j; printf("i:"); scanf("%d",&i); j=ret(i); printf("\n%d\n",j); return 0; }
Code:int ret(int a) { return a*a; }