English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

2 answers

did you do

int array[];

or try to make an array with a variable that was dynamic but didn't declare the array as dynamic?

int x=8;
int array[x];

you would need to

int x=8;
int *array;
array=new int [x];

to make it dynamic

2006-11-14 15:57:47 · answer #1 · answered by Anonymous · 0 1

one major use of arrays to its means to keep numerous values of a similar form. compared to a structure that can keep numerous documents of diverse form. note the version: arrays = same form a 1D array is clone of storing values in each and each and every. it really acts as a storage and is unable to numerous storage or maybe operations on array. a second array will be used to study values to boot. party, you may study the cost in array[0][0] with fee in array[a million][0]. suggestion retrieval: sure, arrays will be used to keep numerous inputs as reported earlier and to boot can retrieve this knowledge. a second array is mostly extra versatile than a unmarried array it may also provide you with some variety of structure compared to the 1D array it supplies some thing like a length (second like seeing a flat image of your array)

2016-11-24 20:22:19 · answer #2 · answered by ? 4 · 0 0

fedest.com, questions and answers