fork(5) download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4.  
  5. class cat
  6. {
  7. private:
  8. int height;
  9. public:
  10. cat (int inputHeight);
  11. };
  12.  
  13. cat::cat (int inputHeight)
  14. {
  15. height = inputHeight;
  16. }
  17.  
  18. class twoCats
  19. {
  20. private:
  21. cat firstCat;
  22. cat secondCat;
  23. public:
  24. twoCats (cat theFirstCat);
  25. void addSecondCat (cat theSecondCat);
  26. };
  27.  
  28. twoCats::twoCats (cat theFirstCat) : firstCat( theFirstCat), secondCat( theFirstCat)
  29. {
  30. }
  31.  
  32. void twoCats::addSecondCat (cat theSecondCat)
  33. {
  34. secondCat = theSecondCat;
  35. }
  36.  
  37. int main() {return 0;}
Success #stdin #stdout 0s 3336KB
stdin
Standard input is empty
stdout
Standard output is empty