CString Str;
    CString SS;
    CString Str1;
    int ieax=-1; 
   CEdit *m_Edit = (CEdit *)GetDlgItem(IDC_EDIT1);
    m_Edit->GetWindowText(Str);
    SS.Format("%d",ieax);
    Str1=Str;
    if Str1=SS then
         MessageBox("错误!");
出现的错误提示是:
E:\111\111Dlg.cpp(461) : error C2061: syntax error : identifier 'Str1'
请问该怎么来解决?
谢谢

解决方案 »

  1.   

    Str1=SS 改为 Str1 == SS
      

  2.   

    if Str1=SS then  //该为==
             MessageBox("错误!");
      

  3.   

    if Str1==SS then
    怎么是basic
    if(str1 == ss)
       AfxMessageBox("错误");
      

  4.   

    str1=ss是赋值语句str1==SS是逻辑判断语句
    再有去掉thenVC没有这个玩意
      

  5.   

    if Str1=SS then
    应为
    if Str1==SS then
      

  6.   

    1、if Str1=SS then
    怎么是basic
    if(str1 == ss)
       AfxMessageBox("错误");2、还可以用如下方法:
    if(ss = str1)
       AfxMessageBox("错误");