dynamic-arrays

Arraylist in C.

HELLO WORLD, GUYS!!! I am currently writing a program to implement an arraylist (or dynamic array) in C. Hmm... I think I have 70 - 80% done with it, however, I found a serious problem with my codes when testing them on a couple of machines. Briefly, I inserted a group of strings( char* ) into my arraylist, and tried to get and display...

When an Open Array Parameter isn't so Open

I was looking at http://stackoverflow.com/q/3780235/71200 and started experimenting. What I discovered is rather interesting. procedure Clear(AArray: array of Integer); var I: Integer; begin for I := Low(AArray) to High(AArray) do AArray[I] := 0; end; var MyArray: array of Integer; begin Clear(MyArray); end. This simple l...

C++ Using 3D Dynamic Arrays and Vectors

I'm new to C++ and getting a bit frustrated with it. Below, in pixelsVector, I am storing each pixel RGB float-value in Pixel and want to dump all the values to a byte array with pixelsArray so I can output to an image file. HEIGHT and WIDTH refer to the image dimensions. The code below works fine, but I need to specify the sizes of ...

3D array C++ using int [] operator

hi, I'm new to C/C++ and I've been cracking my head but still got no idea how to make an "structure" like this It's supposed to be a 3D dynamic array using pointers. I started like this, but got stuck there int x=5,y=4,z=3; int ***sec=new int **[x]; It would be enough to know how to make it for a static size of y and z; Plea...

Need to build arrays in Javascript +=?? getting strings....

Ok basic JS 101 I know, but can't find the answer... For the below code I have declared var mls_link = []; In globals The data.getValue yields a string item (http addresses) When I step through the code the string is an array rather than each "item" being a array entry.. ie mls_link [0] is h (the beginning of the http address) I want e...