Question:
Can you make an array of enumeration types?If so, how do you do it?
Answer:
Yes you can, and it is very simple:
enum direction { Up, Down};direction arr[10]; // create arrayarr[0] = Down; // use array
Home » Enumeration Types
Question:
Can you make an array of enumeration types?If so, how do you do it?
Answer:
Yes you can, and it is very simple:
enum direction { Up, Down};direction arr[10]; // create arrayarr[0] = Down; // use array
At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.
See our full editorial policy.