what's wrong with these codes?

//The assignments are all right. read a graph(not a hypergraph) from database
//first column weight, second column vertice A, third column vertice B.
/////////////////////////////////////////////////////////////////////////////////////////
Cgraphset* m_pset=new Cgraphset;//Cgraphset is a CRecordset
m_pset->Open()
int nvtxs=m_pset->m_pa;//first row stores metainfo
int nhedges=m_pset->m_weight;// first row stores metainfo
int* vwgts=0;
int* eptr=new int[nhedges+1];
int* eind=new int[2*nhedges];
int* hewgts=new int[nhedges];
int nparts=2;
int ubfactor=25;
int* options=new int[9];
options[0]=0;
int* part=new int[nvtxs];
int* edgecut=new int;
int edgeindex=0;
m_pset->MoveNext();// first row stores metainfo, so move to the second
while (!m_pset->IsEOF())
{
hewgts[edgeindex/2]=m_pset->m_weight;
eind[edgeindex++]=m_pset->m_pa;
eind[edgeindex++]=m_pset->m_pb;
m_pset->MoveNext();

}
for ( i=0;i