Advertisement
Guest User

Untitled

a guest
Aug 24th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4.  
  5. class Person
  6. {
  7. public:
  8. int a = 10;
  9. };
  10.  
  11. class Employee : public Person
  12. {
  13. public:
  14. double a = 3.14;
  15. void Test()
  16. {
  17. cout << a << "\n";
  18. cout << Person::a << "\n";
  19. }
  20. };
  21.  
  22. void main()
  23. {
  24. Employee e;
  25. e.Test();
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement