①整形(int)转化为字符串型(CString)
 //变量定义
 private:
  int m_iRandom;
  CString m_sRandom;
 //int类型转换为CString类型
  m_sRandom.Format("%d",m_iRandom);

②//获取系统当前时间
 CTime tm;
 tm=CTime::GetCurrentTime();
 m_sCurrentTime=tm.Format("%Y-%m-%d %X");

 

③CString类型转换为long类型

CString m_CardCode;

long lCardCode=  atof(m_CardCode); 

相关文章:

  • 2021-08-24
  • 2021-08-19
  • 2022-02-18
  • 2021-05-16
  • 2022-12-23
猜你喜欢
  • 2021-11-20
  • 2021-05-12
  • 2022-01-25
  • 2022-01-07
  • 2021-09-20
  • 2021-06-27
  • 2021-11-02
相关资源
相似解决方案