RT
struct A{
int numcom;
CString name;
}A[4]={14,("$GPGGA"),17,("$GPGSA"),19,("$GPGSV"),12,("$GPRMC")};调试出现 error C2440: 'initializing' : cannot convert from 'const char [7]' to 'CString'
struct A{
int numcom;
CString name;
}A[4]={14,("$GPGGA"),17,("$GPGSA"),19,("$GPGSV"),12,("$GPRMC")};调试出现 error C2440: 'initializing' : cannot convert from 'const char [7]' to 'CString'
A[0].name = "$GPGGA";
你的工程字符集是unicode的
所以需要对字符串限定一下
A[4]={{14,("$GPGGA")},{17,("$GPGSA")},{19,("$GPGSV")},{12,("$GPRMC")},};