将CString类型的变量转化成char*:
char* keyChar = key.GetBuffer(0); //key为CString类型
...
key.ReleaseBuffer(); //用完CString后记得释放缓冲
刚开始用C++,以前都是用的Java,希望Everything will go pretty well!