char转换为double
char* chaValue = "116.397380;39.908395";
double x = 0.0;
double y = 0.0;
sscanf(chaValue, "%lf;%lf", &x, &y);
int转换为char
int m_btCommPort = 1;
int m_dwBaudrate = 4800;
CString strCommPort;
strCommPort.Format("%d", m_btCommPort);
CString strBaudrate;
strBaudrate.Format("%d", m_dwBaudrate);
CString chaValueString = strCommPort + ";" + strBaudrate;
int length = chaValueString.GetLength();
char* chaValue = new char[length];
chaValue = chaValueString.GetBuffer(length);
CString title = "我是六子";
char* pCh = title.GetBuffer(title.GetLength());