Ah hah, found the solution ;) Thanks for the help ~
// global declares
struct Element{
char
*name,
*type,
*length,
*dec;
};
Element *Schema=NULL;
int NumFields=0;
// end globals
// code
Schema = RedimensionArray(Schema);
NumFields++;
// code
// function causing the problem
Element *RedimensionArray(Element *pOldArray){
Element *pNewArray=new Element[NumFields+1];
ASSERT(pNewArray!=NULL);
if(pOldArray!=NULL){
// copy the contents and delete the old array
for(int i=0;i
pNewArray[i]=pOldArray[i];
delete[] pOldArray;
}
return pNewArray;
}
// end func
Chris Zangarine
Software Development Engineer
Pipeline Compliance System (PCS)
American Innovations