C:\Documents and Settings\ASUS\桌面\C++\多文件\Makefile.win [Build Error] [多文件/多文件.exe] Error 1
附上我的两个源代码文件:
file1:
#include <stdio.h>
#include <cstdlib>
int A;
main()
{
int power(int);/*对被调用函数的声明*/
int b=3,c,d,m;
printf("enter the number a and its power m:\n");
scanf("%d,%d",A,m);
c=A*b;
d=power(m);
printf("%d*%d=%d\n",A,b,c);
printf("%d**%d=%d\n",A,m,d);
system("pause");
}
file2:
#include <cstdlib>
extern int A;
int power(int n)
{int i,y=1;
for(i=1;i<=n;i++)
y*=A;
return(y);
system("pause");
}