Hi!
You can use realloc with calloc just as with malloc…
I think it goes like this:
char * test;
test=(char*)malloc(10);
test=(char*)realloc(test,20)
//Not sure if the realloc call´s syntax is correct look it up in the help…
However realloc is a bitch…Using it has several dangers…The biggest problem is that there is no guarantee that the new allocated space starts at the same memory-address than the old one…Which means that all pointers that are assigned to the array in previous code need to be reassigned after realloc in case the memory location has changed(very likely)…If you don´t reassign them you can get some serios crash…
Greets,XBTC!
[This message has been edited by XBCT (edited 08-06-2000).]