fork(1) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class Wheel{
  5. int radius,
  6. thickness;
  7. public:
  8. Wheel(int radius_, int thickness_) : radius(radius_), thickness(thickness_)
  9. {}
  10. };
  11.  
  12. class Taxi {
  13. Wheel myWheel[4];
  14. public:
  15. Taxi();
  16. };
  17.  
  18. Taxi::Taxi () : myWheel { Wheel(5,5), Wheel(3,3), Wheel(5,5), Wheel(3,3)} {
  19. cout << "Ctor of Taxi" << endl;
  20. }
  21.  
  22. int main() {
  23. Taxi taxi;
  24. return 0;
  25. }
Success #stdin #stdout 0s 3296KB
stdin
Standard input is empty
stdout
Ctor of Taxi