Enumeration and Switch statement

The following C++ code describes an enumeration user defined type together with a switch statement


//============================================================================
// Name        : enum_switch
// Author      : chd
// Version     :
// Copyright   : no copyright
// Description : An enumeration type together with a switch statement
//============================================================================

#include <iostream>
using namespace std;

int main() {

	enum bctype{Dirichlet, Neumann, Robin};
	bctype bc;
	int x;


	cout<<"Choose boundary condition by number"<<endl;
	cout<<"Available bc are:"<<endl;
	cout<<"0.Dirichlet"<<endl;
	cout<<"1.Neumann"<<endl;
	cout<<"2.Robin"<<endl;
	cin>>x;
	bc=static_cast<bctype>(x);


	switch (bc) {
		case Dirichlet:
			cout<<"Dirichlet BC";
			break;

		case Neumann:
		cout<<"Neumann BC";
			break;

		case Robin:
			cout<<"Robin BC";
			break;

		default:

			cout<<"undefined BC";
			break;
	}

	//return 0;
}