一个程序两个以上源文件怎么编译呢?
<----------------------------------------------文件名:staticOutside.c---------------------------------------->#include <stdio.h>
#include <conio.h>
static int num=10;
int main()
{
printf("num in Outside.c is %d,address is %p\n",num,&num);
void print1(void);
void print2(void);
print1();
print2();
getch();
return 0;
}
<---------------------------------------------文件名:Func.c------------------------------------------------->
#include <stdio.h>
#include <conio.h>
static int num=100;
void print1()
{
static int num=1000;
printf("num in print1 is %d,address is %p\n",num,&num);
}
void print2()
{
printf("num in print2 is %d,address is %p\n",num,&num);
}
上面这程序没发编译,求大神前辈帮忙解答下,