我收到所有这些错误:
未定义引用'getLength()'
未定义引用'getWidth()'
未定义引用'getArea(double,double)'
未定义引用'displayData(double,double,double)'
这是我的代码:
#include <iostream>
using namespace std;
double getLength();
double getWidth();
double getArea(double,double);
void displayData(double,double,double);
int main()
{
double length;
double width;
double area;
length = getLength();
width = getWidth();
area = getArea(length,width);
displayData(length,width,area);
return 0;
}
//getLength function
double getLength();
{
double length;
cout << "Length: ";
cin >> length;
return length;
}
//getWidth function
double getWidth();
{
double width;
cout << "Width: ";
cin >> width;
return width;
}
//GetArea function
double getArea(double lenght, …
Run Code Online (Sandbox Code Playgroud) c++ ×1