Created
September 30, 2018 14:31
-
-
Save ichtrojan/180d81d7f2ab5dca5a9cf9ae10b32501 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
class human { | |
public: | |
string name; | |
int age; | |
void eat () { | |
cout << name <<" is eating" << endl; | |
} | |
}; | |
int main () { | |
human exhibitA; | |
exhibitA.name = "Michael"; | |
exhibitA.eat(); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment