Tag Archives: Array
Pass a STL Array of fixed size as a parameter to another function without declaring the size in the function signature or prototype
There are two ways of doing this. You can either pass in a pointer/reference to the array along with it’s size to the function. #include <iostream> #include <array> void swap(int *arr, int a, int b) { auto t = arr[a]; arr[a] = arr[b]; arr[b] = t; } int partition(int *arr, int low, int high) { […]
Iterating over a custom ‘Jagged Array’ in Python
A jagged array is an array whose elements are arrays. The elements of a jagged array can be of different dimensions and sizes. A jagged array is sometimes called an "array of arrays." C# natively differentiates between a jagged and a multidimensional array. To iterate over a every single element of a Jagged Array in […]
Custom Wrapper Class for Dictionary component – Flex {UPDATED}
Added some new functionality and plugged possible bugs. New functions incorporated: function insertKeyValue(keyValueCombo:Object):void >>Argument passed in is used as both Key and Value function insertArray(arr:Array):void >>Takes an Array object as argument and inserts each Array element in the MyDictionary Object function clone():MyDictionary >>Performs a deep copy function getValue(key : Object):Object >>Returns the corresponding value for the […]
Login