Find out the errors if any #include using namespace std; Class to represent a box class Box {public: double length; double breadth; double height;// Inline initializationBox(double lv = 1.0, double bv = 1.0, double hv = l.0):length(lv), breadth(bv), height(hv){cout << "Box constructor called" << endl;}// Function to calculate the volume of a boxdouble volume(){return length * breadth * height;}};int main(){Box firstBox(80.0, 50.0, 40.0);// Calculate the volume of the boxdouble firstBoxVolume = firstBox.volume()cout << endl;cout << "Size of first Box object is" << firstBox.length << " by" << firstBox.breadth << " by" << firstBox.height << endl;cout << "Volume of first Box object is " << firstBoxVolumereturn 0;}
Answers
Answered by
0
your entire code is recuced to this:
class Box {public: double length; double breadth; double height;
because of the neverending comment
Learn to write code with proper indentation.
Its impossible to understand
class Box {public: double length; double breadth; double height;
because of the neverending comment
Learn to write code with proper indentation.
Its impossible to understand
Similar questions
Physics,
7 months ago
Physics,
7 months ago
Accountancy,
7 months ago
Physics,
1 year ago
Business Studies,
1 year ago
Business Studies,
1 year ago