fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class Tank
  5. {
  6. private:
  7. int gallons;
  8. public:
  9. Tank()
  10. { gallons = 50; }
  11. Tank(int gal)
  12. { gallons = gal; }
  13. int getGallons()
  14. { return gallons; }
  15. };
  16.  
  17. int main() {
  18. Tank storage1, storage2, storage3(20);
  19. cout << storage1.getGallons() <<
  20. // your code goes here
  21. return 0;
  22. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:21:2: error: expected primary-expression before ‘return’
  return 0;
  ^~~~~~
stdout
Standard output is empty