C++ Builder XE2에 xstring에서 다음과 같은 에러가 뜹니다.
[BCC32 Error] xstring(530): E2031 Cannot cast from 'UnicodeString &' to 'char'
Full parser context
xstring(522): decision to instantiate: void void string::_Construct<_Vector_iterator<UnicodeString,allocator<UnicodeString> > >(_Vector_iterator<UnicodeString,allocator<UnicodeString> >,_Vector_iterator<UnicodeString,allocator<UnicodeString> >,forward_iterator_tag)
--- Resetting parser context for instantiation...
Unit14.cpp(6): #include Unit14.h
Unit14.h(10): #include DShowSupporter.h
DShowSupporter.h(6): #include C:\Program Files (x86)\Embarcadero\RAD Studio\9.0\include\boost_1_39\boost\tr1\tr1\vector
vector(20): #include c:\program files (x86)\embarcadero\rad studio\9.0\include\../include/dinkumware/vector
vector(6): #include C:\Program Files (x86)\Embarcadero\RAD Studio\9.0\include\boost_1_39\boost\tr1\tr1\stdexcept
stdexcept(23): #include c:\program files (x86)\embarcadero\rad studio\9.0\include\../include/dinkumware/stdexcept
stdexcept(6): #include c:\program files (x86)\embarcadero\rad studio\9.0\include\dinkumware\xstring
xstring(6): namespace std
xstring(357): class basic_string<_Elem,_Traits,_Ax>
xstring(522): parsing: void void string::_Construct<_Vector_iterator<UnicodeString,allocator<UnicodeString> > >(_Vector_iterator<UnicodeString,allocator<UnicodeString> >,_Vector_iterator<UnicodeString,allocator<UnicodeString> >,forward_iterator_tag)
실제 xstring에서 에러가 난 코드는
append((size_type)1, (_Elem)*_First);
이고요
Main 코드에서
vector<String> mDeviceList;
string s_mDeviceList(mDeviceList.begin(), mDeviceList.end());
이 코드를 주석을 달면 에러가 사라지내요
뭔가 인터넷에서본 Vector를 string형으로 바꾸는걸 잘못 이해한것같은대 조언해 주시면 감사하겠습니다.