Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- class Person
- {
- public:
- int a = 10;
- };
- class Employee : public Person
- {
- public:
- double a = 3.14;
- void Test()
- {
- cout << a << "\n";
- cout << Person::a << "\n";
- }
- };
- void main()
- {
- Employee e;
- e.Test();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement