fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class Box{
  5. public :
  6. int width;
  7. int height;
  8. int length;
  9. void volume(){
  10. cout << length * width * height;
  11. }
  12. };
  13.  
  14. int main() {
  15. Box b;
  16. b.height = 5;
  17. b.width = 4;
  18. b.volume();
  19. }
Success #stdin #stdout 0.01s 5440KB
stdin
Standard input is empty
stdout
Standard output is empty