如题,谢谢!!

解决方案 »

  1.   

    CString::IsEmpty 
    BOOL IsEmpty( ) const;Return ValueNonzero if the CString object has 0 length; otherwise 0.ResTests a CString object for the empty condition.
      

  2.   

    if(0 == your_string.GetLength())
      

  3.   

    CString::IsEmpty 
    BOOL IsEmpty( ) const;Return ValueNonzero if the CString object has 0 length; otherwise 0.ResTests a CString object for the empty condition.
      

  4.   

    CString str;
    int len;
    len=str.Getlength();
    if (0==len)
    printf("字符为空");
      

  5.   

    CString str;if ("" == str)
    {
    }else
    {
    }
      

  6.   

    if(0 == string.GetLength())
      

  7.   

    CString str;
    ...if(str == "")
    {
    ...
    }
      

  8.   

    CString str;str = "hello";if(str.IsEmpty( ) == 0)
    {
       //str为空时进行处理
    }
    esle
    {
      //str不为空
    }
      

  9.   

    if(CStringVar.IsEmpty())
    {
      MessageBox("string is empty!!");
    }