主文件
#include"pch.h"
#include<stdio.h>
#include"4-15-2.cpp"
#define PI 3.14
double c;
double s;
int main(void)
{
double r;
printf("please input the r of the circle\n");
scanf_s("%lf", &r);
fuc(r);
printf("c=%lf", c);
printf("s=%lf", s);
getchar();
return 0;
}
文件4-15-2
#include"pch.h"
#define PI 3.14
extern double c, s;
void fuc(double r)
{
c = 2 * PI*r;
s = PI * r*r;
}
这是一个计算圆的周长和面积的程序,我在vs2017上运行显示这样的错误
这是我的源文件列表
刚入坑小白希望大神帮忙解答一下,感谢!