C语言:外部函数

//main.c
#include <stdio.h>
extern void func();
extern int m;
int n = 200;
int main(){
    func();
    printf("m = %d, n = %d\n", m, n);
    getchar();
    //return 0;
}
//module.c
#include <stdio.h>
int m = 100;
void func(){
    printf("Multiple file programming!\n");
}

posted @ 2021-03-17 06:14  myrj  阅读(176)  评论(0编辑  收藏  举报