1. Home
  2. Computing & Technology
  3. C / C++ / C#

Definition of Enum

By David Bolton, About.com

Definition: Short for enumeration, the concept of an enum variable type is present in C (Ansi, not the original K&R), C++ and C#.

The idea is that instead of using an int to represent a set of values, a type with a restricted set of values in used instead. The compiler limits assignments to variables of the same type thus preventing out of range errors from occurring.

Glossary:

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Examples:
Enums make your programs safer and often increase readability.
Explore C / C++ / C#
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. C / C++ / C#

©2009 About.com, a part of The New York Times Company.

All rights reserved.