如何将float类型转化为CSting 类型的。用什么函数啊????????????

解决方案 »

  1.   

    CString str;
    float ft;
    str.Format("%f",ft);
      

  2.   

    Ò»¡¢ÆäËüÊý¾ÝÀàÐÍת»»Îª×Ö·û´®  
     
    ¶ÌÕûÐÍ(int)  
    itoa(i,temp,10);///½«iת»»Îª×Ö·û´®·ÅÈëtempÖÐ,×îºóÒ»¸öÊý×Ö±íʾʮ½øÖÆ  
    itoa(i,temp,2);  ///°´¶þ½øÖÆ·½Ê½×ª»»    
    ³¤ÕûÐÍ(long)  
    ltoa(l,temp,10);
      

  3.   

    晕,来了这么多乱码,itoa(i,temp,10)
      

  4.   

    Convert an integer to a string.char *_itoa(
       int value,
       char *string,
       int radix 
    );
    char *_i64toa(
       __int64 value,
       char *string,
       int radix 
    );
    char * _ui64toa(
       unsigned _int64 value,
       char *string,
       int radix 
    );
    wchar_t * _itow(
       int value,
       wchar_t *string,
       int radix 
    );
    wchar_t * _i64tow(
       __int64 value,
       wchar_t *string,
       int radix 
    );
    wchar_t * _ui64tow(
       unsigned __int64 value,
       wchar_t *string,
       int radix 
    );
    Parameters
    value 
    Number to be converted. 
    string 
    String result. 
    radix 
    Base of value; must be in the range 2 – 36. 
    Return Value
    Each of these functions returns a pointer to string. There is no error return.
      

  5.   

    其实
    CString str;
    float ft;
    str.Format("%f",ft);
    最好。这就是“格式转换”嘛!
    对不对?
      

  6.   

    happyparrot(快乐鹦鹉) ( ) 说的好,
    ITOA是到字符串
      

  7.   

    CString str;
    float ft;
    str.Format("%f",ft);
    -------------------------------------------------------------
    这个就行呀
      

  8.   

    你把float转成字符,然后把字符转成CString!
    这是一个思路。
    ----------------------------------------------------
    相信明天!快给我分,不然我抢的啦^_^
    ----------------------------------------------------
                           时光.漫步