{"id":293,"date":"2010-07-06T08:02:16","date_gmt":"2010-07-06T08:02:16","guid":{"rendered":"https:\/\/ibex.tech\/visualcpp\/?p=293"},"modified":"2022-02-17T06:24:05","modified_gmt":"2022-02-17T06:24:05","slug":"const-static-arrays","status":"publish","type":"post","link":"https:\/\/ibex.tech\/visualcpp\/memory\/arrays\/const-static-arrays","title":{"rendered":"Const Static Arrays"},"content":{"rendered":"<p>\nYou can create constant arrays no problem and can do it at class level like this in the class variable area:\n<\/p>\n<pre>\r\n<code>\r\n\tstatic array&lt;String^&gt; ^MyStringrray = {&quot;Name 1&quot;, &quot;Name 2&quot;};\r\n\tstatic array&lt;int&gt; ^MyIntArray = {111, 222};\r\n\r\n\tstatic array&lt;UInt16&gt; ^wCRCTable = {\r\n\t\t0x0000, 0xC0C1, 0xC181, 0x0140, 0xC301, 0x03C0, 0x0280, 0xC241,\r\n\t\t0x8201, 0x42C0, 0x4380, 0x8341, 0x4100, 0x81C1, 0x8081, 0x4040 };\r\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>You can create constant arrays no problem and can do it at class level like this in the class variable area: static array&lt;String^&gt; ^MyStringrray = {&quot;Name 1&quot;, &quot;Name 2&quot;}; static array&lt;int&gt; ^MyIntArray = {111, 222}; static array&lt;UInt16&gt; ^wCRCTable = { 0x0000, 0xC0C1, 0xC181, 0x0140, 0xC301, 0x03C0, 0x0280, 0xC241, 0x8201, 0x42C0, 0x4380, 0x8341, 0x4100, 0x81C1, 0x8081, [&hellip;]<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[37],"tags":[],"class_list":["post-293","post","type-post","status-publish","format-standard","hentry","category-arrays"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/posts\/293","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=293"}],"version-history":[{"count":6,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/posts\/293\/revisions"}],"predecessor-version":[{"id":1108,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/posts\/293\/revisions\/1108"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/media?parent=293"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/categories?post=293"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/tags?post=293"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}