#include <iostream>
#define CASE_PRINT(c) case c:	\
	std::cout<<#c<<std::endl;	\
	break
int main()
{
	const int birch=0;
	enum tree { oak, pine, fir };
	static tree a;
	switch ( a ) {
		CASE_PRINT(birch);
		CASE_PRINT(oak);
		CASE_PRINT(pine);
		CASE_PRINT(fir);
	}
}
Login in to like
Login in to comment