Im writing a class to calculate the volume of a box.The values are width 5, height 5, length 5.
Why is the multiplacation function not returning 125 please?
int SetitsHeight(int height) {height = itsHeight;}
int SetitsLength(int length){length= itsLength;}
int SetitsWidth(int width){width = itsWidth;}
a = b; means that a is assigned the value of b.
You are assigning your function parameter, not your class's data member.
Switch your assignments around.