Я получаю все эти ошибки:Неопределенная ссылка на «(все мои функции)»
неопределенная ссылка на «GetLength()»
неопределенной ссылкой на «GetWidth()»
неопределенной ссылкой 'GetArea (двойной, двойной)'
неопределенная ссылка на 'displayData (двойной, двойной, двойной)'
Вот мой код:
#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, double width);
{
return length*width;
}
//displayData function
void displayData(double length, double width, double area);
{
cout << "\nRectangle Data\n"
<< "---------------\n"
<< "Length: " << length << endl
<< "Width: " << width << endl
<< "Area: " << area << endl;
}
Не видел эту ошибку! Хороший ! Однако он не пропускает скобки в конце основного ;-), а скорее скобки :-) – LBes