DEV C建立工程后,多个.c函数无法编译
我分别建立了a.c ,b.c ,abc.h,放在同一目录了,在DEV C中建立了工程,一起放进去,但是无法编译啊。会显示why in the world are you trying to compile a empty project?...源码:a.c:
#include <stdio.h>
#include <stdlib.h>
#include "abc.h"
int main (void)
{
int a,b;
puts("please input 2 numbers:");
while (scanf("%d,%d",&a,&b)==2)
printf("%d\n",plus(a,b));
printf("%d",num);
system("pause");
}
b.c:
#include "abc.h"
#include <stdio.h>
#include <stdlib.h>
int num=0;
int plus (int a,int b)
{
num++;
return (a+b);
}
abc.h:
//abc.h
int num;
int plus (int a,int b);