Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include "iostream"
- #include "string"
- using namespace std;
- class Birds {
- public:
- void setEyes(int eyes);
- double getEyes(void);
- Birds();
- protected:
- int eyes;
- double wings;
- };
- Birds::Birds(void) {
- }
- void Birds::setEyes(int eyes) {
- eyes = 2;
- }
- double Birds::getEyes(void) {
- return eyes;
- }
- int main()
- {
- Birds lucas;
- lucas.setEyes(2);
- cout << "Number of eyes :" << lucas.getEyes() << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement