fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. class person
  5. {
  6. public:
  7. int tall=0, weight=1;
  8. };
  9. class student: public person
  10. {
  11. public:
  12. int t() { return tall; }
  13. private:
  14. int number=2;
  15. };
  16.  
  17. int main() {
  18. // your code goes here
  19.  
  20. student tim;
  21. cout<<tim.t()<<endl;
  22. return 0;
  23. }
Success #stdin #stdout 0s 4296KB
stdin
Standard input is empty
stdout
0