小编Mik*_*eta的帖子

未明确引用'(我的所有功能)'

我收到所有这些错误:

未定义引用'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++

-2
推荐指数
1
解决办法
165
查看次数

标签 统计

c++ ×1