纠结的小问题.
- C/C++ code
for(int nBtn = 0;nBtn < 12; nBtn++) { CString m_strIndex[12]; wchar_t Tempm_strIndex[30]; wcscpy(GPSData.Tempm_strIndex[nBtn],m_strIndex[nBtn]); }
错误提示:
error C2664: 'wcscpy' : cannot convert parameter 1 from 'wchar_t' to 'wchar_t *'
1> Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
wchar_t Tempm_strIndex[30];
是GPSData结构体中的一个.
[解决办法]
for(int nBtn = 0;nBtn < 12; nBtn++)
{
CString m_strIndex[12];
wchar_t Tempm_strIndex[30];
GPSData.Tempm_strIndex[nBtn]=m_strIndex[nBtn];
}
[解决办法]