想了好几天无法理解的出错,请高手指点
想了好几天无法理解的出错,请高手指点。![](images/smilies/emot/em03.gif)
![](images/smilies/emot/em03.gif)
以下为什么出错:
![](http://bbs_bccn_net.bccnsoft.com/006/month_1310/20131012_10b28da07225d69c7d7e483aep66d6eS.jpg)
![](http://bbs_bccn_net.bccnsoft.com/006/month_1310/20131012_4c4fc0edebf14daf1688fVfaAjKnZFaf.jpg)
![](http://bbs_bccn_net.bccnsoft.com/006/month_1310/20131012_23439e8faa303039aef1egECCHW3OLx7.jpg)
![](http://bbs_bccn_net.bccnsoft.com/006/month_1310/20131012_cee5d3565c5ff1f131d6bsAkN9bI0dH0.jpg)
以下是代码:
UINT updatePos1(LPVOID lp)
{
CString temStr;
CString planStr;
CString posPrize;
tagPos1 *pStructPos1=(tagPos1*)lp;
CString Prize=pStructPos1->temPrize;
int i=pStructPos1->pos;
int Cur=0,Max=0,Times=0;
int pos;
for (int j=0;j<1022;j++) //1022个组合
{
planStr=Pos1[i][j][0];
posPrize=Prize.Mid(i,1);
pos=planStr.Find(posPrize);
Cur=atoi(Pos1[i][j][1]);
Max=atoi(Pos1[i][j][2]);
Times=atoi(Pos1[i][j][3]);
if (pos==-1) //没有中
{
Cur++;
if (Cur>Max)
{
Max=Cur;
}
}
else //中奖
{
Cur=0;
Times++;
}
CString temStr1,temStr2,temStr3,temStr4;
temStr1.Format("%d",Cur);
Pos1[i][j][1]=temStr1;
temStr2.Format("%d",Max);
Pos1[i][j][2]=temStr2;
temStr3.Format("%d",Times);
Pos1[i][j][3]=temStr3;
}//1022个组合
switch (i)
{
case 0:
wPos1=TRUE;
break;
case 1:
qPos1=TRUE;
break;
case 2:
bPos1=TRUE;
break;
case 3:
sPos1=TRUE;
break;
case 4:
gPos1=TRUE;
break;
}
return 0;
}
[ 本帖最后由 yongkuiluo 于 2013-10-12 21:35 编辑 ]