如果能过提供自己整理的库,给分100!Does a good farmer neglect a crop he has planted?
Does a good teacher overlook even the most humble student?
Does a good father allow a single child to starve?
Does a good programmer refuse to maintain his code?
              -- Geoffrey James, "The Tao of Programming"

解决方案 »

  1.   

    http://www.pcvc.net/relevance/b_detail.asp?sendid=24
      

  2.   

    简单说起来有三种
    1 类型强制转换
      long l;
      int i = (int)l;
      包括对中对转换符号的重载
      char *p,str[]="GOOD";
      CString cstr="GOOD";
      p=(char *)cstr;
     
    2 函数转换
      atol,atoi
      itoa,itoa
      CString::Format()
      BSTR b=_com_util::ConvertStringToBSTR("数据");
     char *p=_com_util::ConvertBSTRToString(b);
    3 类构造转换
      CString(char *p);4 混合转换
      这种转换包括上面转换的一种以上先强制转换,然后再构造转换用的多一点long l=222;
    ing i=100;
    _variant_t lVal(l);
    lVal = (long)i;基本上可以确定为以上 4种,不知道那位还有补充!Does a good farmer neglect a crop he has planted?
    Does a good teacher overlook even the most humble student?
    Does a good father allow a single child to starve?
    Does a good programmer refuse to maintain his code?
                  -- Geoffrey James, "The Tao of Programming"