郁闷,请大家帮忙看看这段程序为什么在Release中不运行了
其实很简单,就是从一个文本文件中读数据,再存到一个vector中,
Debug下没有问题,但是在Release中,程序始终怪异的不执行其中的for循环部分
std::vector<cSimGauss> LoadGaussSimPara( CString sfName )
{
CStdioFile txtf;
txtf.Open(sfName,CFile::modeRead);
CString tmpbuf;
txtf.ReadString( tmpbuf );
int sCnt = _ttoi( tmpbuf );
std::vector<cSimGauss> sLine;
//sLine.reserve( cnt );
for ( int j=0; j<sCnt; j++)
{
cSimGauss cRec;
txtf.ReadString( tmpbuf );
cRec.A = _tstof( tmpbuf );
txtf.ReadString( tmpbuf );
cRec.B = _tstof( tmpbuf );
txtf.ReadString( tmpbuf );
cRec.r0.x = _tstof( tmpbuf );
txtf.ReadString( tmpbuf );
cRec.r0.y = _tstof( tmpbuf );
txtf.ReadString( tmpbuf );
cRec.r0.z = _tstof( tmpbuf );
sLine.push_back( cRec );
}
txtf.Close();
return sLine;
}