MFC编辑框设定了变量,数据无法输出问题,如图
运行后,所有属性都是0,没有改变,为什么voidCMyDlg::OnEditchangeCareercombo3()//组合框函数{//TODO:Addyourcontr...
运行后,所有属性都是0,没有改变,为什么
void CMyDlg::OnEditchangeCareercombo3() //组合框函数{ // TODO: Add your control notification handler code here CString str; int nIndex = m_career.GetCurSel(); UpdateData(true); while(nIndex=0) { srand((unsigned)time(NULL));//初始化随机数 m_power=(rand()%10)+35; m_quick=(rand()%10)+15; m_phypower=(rand()%10)+25; m_intelligence=(rand()%10)+2; m_wisdom=(rand()%10)+2; m_blood=m_phypower*20; m_magic=(m_intelligence+m_wisdom)*10; str.Format("%d",m_power); UpdateData(false); }
} 展开
void CMyDlg::OnEditchangeCareercombo3() //组合框函数{ // TODO: Add your control notification handler code here CString str; int nIndex = m_career.GetCurSel(); UpdateData(true); while(nIndex=0) { srand((unsigned)time(NULL));//初始化随机数 m_power=(rand()%10)+35; m_quick=(rand()%10)+15; m_phypower=(rand()%10)+25; m_intelligence=(rand()%10)+2; m_wisdom=(rand()%10)+2; m_blood=m_phypower*20; m_magic=(m_intelligence+m_wisdom)*10; str.Format("%d",m_power); UpdateData(false); }
} 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询