这是从 .cpp 文件中抛出的错误。我正在使用 Visual Studio 10 和 windows7 32 位,并且正在从 eclipse indigo 编译
AUWideString(JNIEnv* jni, jstring jstr)
: mJni(jni),
mJString(jstr),
mString(0)
{
if (jstr != 0) {
mString = jni->GetStringChars(jstr, 0);
}
}
~AUWideString()
{
mJni->ReleaseStringChars(mJString, mString);
}
operator const wchar_t*() const
{
return mString;
}
**error C2440: '=' : cannot convert from 'const jchar *' to 'const wchar_t *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
error C2664: 'JNIEnv_::ReleaseStringChars' : cannot convert parameter 2 from 'const wchar_t *' to 'const jchar *'****
这应该如何解决?