Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- class dept
- {
- public :
- int door;
- int window;
- int CSE_lab;
- int EEE_lab;
- void CSE_building();
- void EEE_building();
- };
- void dept :: CSE_building()
- {
- cout<<"\tCSE"<<endl;
- }
- void dept :: EEE_building()
- {
- cout<<"\tEEE"<<endl;
- }
- class A: public dept
- {
- public :
- A()
- {
- door = 40;
- window = 76;
- CSE_lab = 4;
- EEE_lab = 2;
- // void CSE_building();
- // void EEE_building();
- }
- };
- main()
- {
- A s;
- cout<<"\tDoors\t"<<s.door<<endl;
- cout<<"\tWindows\t"<<s.window<<endl;
- cout<<"\tNumber Of CSE Lab.\t"<<s.CSE_lab<<endl;
- cout<<"\tNumber Of EEE Lab.\t"<<s.EEE_lab<<endl;
- s.CSE_building();
- s.EEE_building();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement