Skip to content

Instantly share code, notes, and snippets.

@MasazI
Created May 23, 2015 13:35
Show Gist options
  • Select an option

  • Save MasazI/d6093bd82016c019be05 to your computer and use it in GitHub Desktop.

Select an option

Save MasazI/d6093bd82016c019be05 to your computer and use it in GitHub Desktop.
enum.cpp
//
// 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