Quote:
Originally Posted by xpi0t0s View Post
Change the line
Box::Box(double 10.0,double 20.0,double 30.0);

to
Box(double l,double w,double d);

and remove the semicolons off the Box::Box, Box::volume and Box::area function bodies. (You didn't put one after main, which is correct, so it's not clear why you think you should put one after other functions.)

In a function prototype you specify variable names, not values.
Function bodies should not include a semicolon between the close bracket and open brace.
ok this brings the question of how to initialize the values to 10.0 20.0 30.0 as stated in the original problem. I was thinking like this
Code:
 Box(double l,double w,double d)
              {
                         length=10.0;
                         width=20.0;
                         depth=30.0;
              }
Is this correct?
The functions give the answers
1
6000
6000

so I am assuming this would work.