Created
May 23, 2015 13:35
-
-
Save MasazI/d6093bd82016c019be05 to your computer and use it in GitHub Desktop.
enum.cpp
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
| // | |
| // enum.cpp | |
| // CplusplusPractice | |
| // | |
| // Created by masai on 2015/05/23. | |
| // Copyright (c) 2015年 masai. All rights reserved. | |
| // | |
| #include <iostream> | |
| using namespace std; | |
| enum Gender{ | |
| MALE, | |
| FEMALE | |
| }; | |
| enum FunctionType{ | |
| NORMAL = 1, | |
| ACTIVATION = 2, | |
| LOSS = 3 | |
| }; | |
| enum Type{ | |
| YES = 1, | |
| NO = -1 | |
| }; | |
| class A{ | |
| public: | |
| Type function(){ | |
| return NO; | |
| } | |
| }; | |
| int main(int argc, char* argv[]){ | |
| A a; | |
| cout << a.function() << endl; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment