{"id":298,"date":"2010-07-06T08:13:33","date_gmt":"2010-07-06T08:13:33","guid":{"rendered":"https:\/\/ibex.tech\/visualcpp\/?p=298"},"modified":"2022-02-17T06:24:05","modified_gmt":"2022-02-17T06:24:05","slug":"array-functions","status":"publish","type":"post","link":"https:\/\/ibex.tech\/visualcpp\/memory\/arrays\/array-functions","title":{"rendered":"Array Functions"},"content":{"rendered":"<h4>\nArray Class<br \/>\n<\/h4>\n<pre>\r\n<code>\tType Array:: to get all the members of the Array class you can use<\/code><\/pre>\n<h4>\nClear array<br \/>\n<\/h4>\n<pre>\r\n<code>\tArray::Clear(arrayName, 0, araryName-&gt;Length);\t\/\/(name, start index, number of indexes to erase)<\/code><\/pre>\n<h4>\nCopy Array<br \/>\n<\/h4>\n<pre>\r\n<code>\tArray::Copy(Source, Dest, Length);\t\t\/\/This will work with multi dimension arrays also<\/code><\/pre>\n<h4>\nIncrease Array Size<br \/>\n<\/h4>\n<pre>\r\n<code>\tArray::Resize(myArr, myArr-&gt;Length + 5);\t\t\/\/Resize the array to a bigger size (five elements larger - could be made smaller instead).<\/code><\/pre>\n<h4>\nAdd New Item To End Of Array<br \/>\n<\/h4>\n<pre>\r\n<code>\r\n\t Array::Resize(MyArray, MyArray-&gt;Length + 1);\r\n\t MyArray[(MyArray->Length - 1)] = NewValue;\r\n<\/code><\/pre>\n<h4>\nSearch Array<br \/>\n<\/h4>\n<pre>\r\n<code>\tindex = Array::BinarySearch(MyArray, &quot;Text&quot;); \t\/\/(&gt;= 0 means it was found, -1 if not)<\/code><\/pre>\n<p>\n&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Array Class Type Array:: to get all the members of the Array class you can use Clear array Array::Clear(arrayName, 0, araryName-&gt;Length); \/\/(name, start index, number of indexes to erase) Copy Array Array::Copy(Source, Dest, Length); \/\/This will work with multi dimension arrays also Increase Array Size Array::Resize(myArr, myArr-&gt;Length + 5); \/\/Resize the array to a bigger [&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-298","post","type-post","status-publish","format-standard","hentry","category-arrays"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/posts\/298","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=298"}],"version-history":[{"count":8,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/posts\/298\/revisions"}],"predecessor-version":[{"id":1376,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/posts\/298\/revisions\/1376"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/media?parent=298"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/categories?post=298"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/visualcpp\/wp-json\/wp\/v2\/tags?post=298"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}