格式转换

来源:互联网 发布:天谕头发颜色数据 编辑:程序博客网 时间:2024/05/16 13:56

tostring(int b){
 CString a;
 a.Format("%d", b);
 return a;
}

CString str;double db;int n;str.Format("%lf",db);str.Format("%d",n);atoi()转换为   intatof()转换为  float

int ix0 = _tcstoul(pram_page,0,16);
     int ix1 = ix0 +1;
     CString cx1;
     cx1.Format("%02x",ix1 );
     pram_page = cx1;

_tcstoul(),都能把字符串转化成任意进制的长整数(如二进制八进制、十进制或十六进制