Top "Dynamic-arrays" questions

Anything related to dynamic arrays, i.e. array-like data structures where the length of the array (the number of its elements) can be changed at runtime, thus allowing adding or removing elements without explicit memory allocation and management.

How do i allocate memory for a 2d array?

How do i declare a 2d array using the 'new' operator? My book says this: int (*p)[4]; p=new[3][4]; but …

c++ arrays new-operator dynamic-arrays
php - create,dynamically, an array initialized with N null elements

I want to create dynamically an array with N (without knowking N) elements. Something like a function public function create_…

php arrays dynamic-arrays
3D array C++ using int [] operator

I'm new to C/C++ and I've been cracking my head but still got no idea how to make an "…

c++ arrays pointers multidimensional-array dynamic-arrays
Linked list vs. dynamic array for implementing a stack

I've started reviewing data structures and algorithms before my final year of school starts to make sure I'm on top …

performance data-structures stack linked-list dynamic-arrays
Removing elements from dynamic arrays

So, I have this: #include <stdio.h> #include <stdlib.h> #include <string.h> void …

c dynamic-arrays
What is the ideal growth rate for a dynamically allocated array?

C++ has std::vector and Java has ArrayList, and many other languages have their own form of dynamically allocated array. …

arrays math vector arraylist dynamic-arrays
Create a fixed size std::vector and write to the elements

In C++ I wish to allocate a fixed-size (but size determined at runtime) std::vector then write to the elements …

c++ arrays constants stdvector dynamic-arrays
Is there a C# equivalent of PHP's array_key_exists?

Does C# have any equivalent of PHP's array_key_exists function? For example, I have this PHP code: $array = array(); $…

c# arrays dynamic-arrays
Do I need to finalize array of records in Delphi?

In my application I have the following record: TTransaction = record Alias: string Description: string Creation: TDateTime Count: Integer end; and …

delphi record dynamic-arrays delphi-6 finalization
C qsort() with dynamic n by 2 multi-dimensional array

First, I defined a dynamic array with 2 columns and 10 row. The integer number is set to 10 here just for example. …

c dynamic-arrays qsort