Using DevC++ and trying to compile my program. Keep getting an error message each time I try. No idea how to fix this am fairly new to C++ so any help would be greatly appreciated.
int main()
{
double length; // The rectangle's length
double width; // The rectangle's width
double area; // The rectangle's area
// Get the rectangle's length.
length = getLength();
{
cout << "Input the length:" << endl;
cin >> length;
if(length > 0)
cout << "Thank you" << endl;
else;
cout << "Invalid input." << endl;
}
// Get the rectangle's width.
width = getWidth();
{
cout << "Input the width:" << endl;
cin >> width;
if(width <= 0)
cout << "Thank you" << endl;
else;
cout << "Invalid input." << endl;
}
// Get the rectangle's area.
area = getArea();
{
area = length * width;
}
// Display the rectangle's data.
double displayData(double length, double width, double area);
{
cout << "The length is: " << length << endl;
cout << "The width is: " << width << endl;
cout << "The area is: " << area << endl;
}
system("pause");
return 0;
}
error reads as:
[Linker error] undefined reference to `getLength()'
[Linker error] undefined reference to `getWidth()'
[Linker error] undefined reference to `getArea()'
ld returned 1 exit status