any idea why this raises an exception after executing the first line in the loop
if (!pCurr)
pCurr->pNext = pNew;
pNew->pPrev = pCurr;

pNew->dwLength = 1;
pNew->szLine = new char[2];
*(sed.pLines->szLine) = chr;
Posted on 2001-07-27 01:55:34 by MovingFulcrum
How did you declare pNew ? Is it big enough ( size >= sizeof(SYNLINE)) ?
Posted on 2001-07-27 02:30:34 by Dr. Manhattan
Sorry fro the late reply. Here is the correct code for everyone to see.Many thanks to Umbongo for helping me out

if (FirstTime==1)
sed.pLines->pNext = new SYNLINE;
memset(sed.pLines->pNext,0,sizeof (SYNLINE));
sed.pLines->pNext->szLine= new char[2];
Posted on 2001-07-30 14:44:32 by MovingFulcrum