Friday, February 4, 2011

enumeration

enumeration constants start from 0, if not specified otherwise.

enum Colors {RED=2, ORG, YEL};

This makes it, RED=2, ORG=3, and YEL=3.

No comments:

Post a Comment