{"id":304,"date":"2010-07-06T08:21:23","date_gmt":"2010-07-06T08:21:23","guid":{"rendered":"https:\/\/ibex.tech\/visualcpp\/?p=304"},"modified":"2022-02-17T06:24:05","modified_gmt":"2022-02-17T06:24:05","slug":"enum-enumeration","status":"publish","type":"post","link":"https:\/\/ibex.tech\/visualcpp\/memory\/enum-enumeration","title":{"rendered":"enum (Enumeration)"},"content":{"rendered":"<p><code>Using Enum<\/code><\/p>\n<pre><code>\tenum name {enumeration list} optional varaible(s);<\/code><\/pre>\n<h5>Examples<\/h5>\n<pre><code>\r\n\tenum colour_type {red, green, blue} colour;\t\/\/The variable colour can only be assigned the\r\n\t\t\t\t\t\t\t\t\tvalues red, green or blue\r\n\t(red = 0, green = 1, blue = 2 will be done by the compiler - these are basically const values)\r\n\r\n\r\n\tenum colour_type {red, green = 9, blue} colour;\t\t\/\/red = 0, green = 9, blue = 10\r\n\r\n\r\n\tenum colour_type {red, green, blue};\r\n\tcolour_type colour;\r\n\tcolour = green;\r\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Using Enum enum name {enumeration list} optional varaible(s); Examples enum colour_type {red, green, blue} colour; \/\/The variable colour can only be assigned the values red, green or blue (red = 0, green = 1, blue = 2 will be done by the compiler &#8211; these are basically const values) enum colour_type {red, green = 9, [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[],"class_list":["post-304","post","type-post","status-publish","format-standard","hentry","category-memory"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/posts\/304","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/comments?post=304"}],"version-history":[{"count":2,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/posts\/304\/revisions"}],"predecessor-version":[{"id":1104,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/posts\/304\/revisions\/1104"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/media?parent=304"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/categories?post=304"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/tags?post=304"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}