Oct 24, 2016 at 3:29am UTC
1 2 3 4 5 6
double length, width, area;
cout << getLength();
cout << getWidth();
cout << getArea();
cout << displayData();
Should be :
1 2 3 4 5 6
double length, width, area;
width = getLength();
length = getWidth();
area = getArea(length, width);
displayData(length, width, area);
Last edited on Oct 24, 2016 at 12:06pm UTC
Oct 24, 2016 at 11:36am UTC
SakurasouBusters' code will work, but I'm curious. OP, I don't see anywhere in your code, or in SakurasouBusters' code, where anything is actually passed by reference. Do you understand what that actually means?
Oct 24, 2016 at 12:42pm UTC
What help do you need? Please be specific.
Your program compiles but has linker errors because your function prototypes do not match your implementations.
Lines 8,9 must match lines 43,51 respectively.
Line 56: You can't return 3 values. See the comma operator here:
http://www.cplusplus.com/doc/tutorial/operators/
Last edited on Oct 24, 2016 at 12:45pm UTC