Показать сообщение отдельно
Старый 11.05.2006, 13:58     # 21
GGin
Guest
 
Сообщения: n/a

Строем динамический массив примерно так:

"int or anything type"
***********************************
int *pAray; //pointer to dynamics array
int kol; //numbers of started elements
... //kol=... must be >0
pArray=(int*)malloc(kol); //pointer for dynamics array with "kol" elements
... //kol+=.... or kol-=.... but kol>0
(int*)realloc(dArray,kol); //pointer for new location of dynamics array with "kol" elements
...
free(dArray); //free allocations memory
********************************