想了好几天无法理解的出错,请高手指点
想了好几天无法理解的出错,请高手指点。以下为什么出错:
以下是代码:
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 编辑 ]