编译 snippets.cpp 时出现以下错误消息。当调用 LoadFile 时会发生这种情况。我正在使用 simpleIni4.2
> 1>------ Build started: Project: SimpleIni, Configuration: Debug Unicode Win32 ------
> 1>Build started 2013-05-24 08:48:37.
> 1>ClCompile:
> 1> snippets.cpp
> 1>c:\documents\simpleini-4.22\simpleini\snippets.cpp(48): error C2664: 'CSimpleIniTempl<SI_CHAR,SI_STRLESS,SI_CONVERTER>::GetAllKeys'
> : cannot convert parameter 1 from 'const char [13]' to 'const wchar_t
> *'
> 1> with
> 1> [
> 1> SI_CHAR=wchar_t,
> 1> SI_STRLESS=SI_GenericCase<wchar_t>,
> 1> SI_CONVERTER=SI_ConvertW<wchar_t>
> 1> ]
> 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
> 1>c:\documents\simpleini-4.22\simpleini\snippets.cpp(54): error C2664: 'CSimpleIniTempl<SI_CHAR,SI_STRLESS,SI_CONVERTER>::GetValue' :
> cannot convert parameter 1 from 'const char [13]' to 'const wchar_t *'
> 1> with
> 1> [
> 1> SI_CHAR=wchar_t,
> 1> SI_STRLESS=SI_GenericCase<wchar_t>,
> 1> SI_CONVERTER=SI_ConvertW<wchar_t>
> 1> ]
> 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
> 1>c:\documents\simpleini-4.22\simpleini\snippets.cpp(61): error C2664: 'CSimpleIniTempl<SI_CHAR,SI_STRLESS,SI_CONVERTER>::GetValue' :
> cannot convert parameter 1 from 'const char [13]' to 'const wchar_t *'
> 1> with
> 1> [
> 1> SI_CHAR=wchar_t,
> 1> SI_STRLESS=SI_GenericCase<wchar_t>,
> 1> SI_CONVERTER=SI_ConvertW<wchar_t>
> 1> ]
> 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
> 1>c:\documents\simpleini-4.22\simpleini\snippets.cpp(65): error C2664:
> 'CSimpleIniTempl<SI_CHAR,SI_STRLESS,SI_CONVERTER>::GetAllValues' :
> cannot convert parameter 1 from 'const char [13]' to 'const wchar_t *'
> 1> with
> 1> [
> 1> SI_CHAR=wchar_t,
> 1> SI_STRLESS=SI_GenericCase<wchar_t>,
> 1> SI_CONVERTER=SI_ConvertW<wchar_t>
> 1> ]
> 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
> 1>c:\documents\simpleini-4.22\simpleini\snippets.cpp(84): error C2664: 'CSimpleIniTempl<SI_CHAR,SI_STRLESS,SI_CONVERTER>::SetValue' :
> cannot convert parameter 1 from 'const char [12]' to 'const wchar_t *'
> 1> with
> 1> [
> 1> SI_CHAR=wchar_t,
> 1> SI_STRLESS=SI_GenericCase<wchar_t>,
> 1> SI_CONVERTER=SI_ConvertW<wchar_t>
> 1> ]
> 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
> 1>c:\documents\simpleini-4.22\simpleini\snippets.cpp(91): error C2664: 'CSimpleIniTempl<SI_CHAR,SI_STRLESS,SI_CONVERTER>::SetValue' :
> cannot convert parameter 1 from 'const char [12]' to 'const wchar_t *'
> 1> with
> 1> [
> 1> SI_CHAR=wchar_t,
> 1> SI_STRLESS=SI_GenericCase<wchar_t>,
> 1> SI_CONVERTER=SI_ConvertW<wchar_t>
> 1> ]
> 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
> 1>c:\documents\simpleini-4.22\simpleini\snippets.cpp(97): error C2664: 'CSimpleIniTempl<SI_CHAR,SI_STRLESS,SI_CONVERTER>::SetValue' :
> cannot convert parameter 1 from 'const char [8]' to 'const wchar_t *'
> 1> with
> 1> [
> 1> SI_CHAR=wchar_t,
> 1> SI_STRLESS=SI_GenericCase<wchar_t>,
> 1> SI_CONVERTER=SI_ConvertW<wchar_t>
> 1> ]
> 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
> 1>c:\documents\simpleini-4.22\simpleini\snippets.cpp(107): error C2664: 'CSimpleIniTempl<SI_CHAR,SI_STRLESS,SI_CONVERTER>::Delete' :
> cannot convert parameter 1 from 'const char [13]' to 'const wchar_t *'
> 1> with
> 1> [
> 1> SI_CHAR=wchar_t,
> 1> SI_STRLESS=SI_GenericCase<wchar_t>,
> 1> SI_CONVERTER=SI_ConvertW<wchar_t>
> 1> ]
> 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
> 1>c:\documents\simpleini-4.22\simpleini\snippets.cpp(110): error C2664: 'CSimpleIniTempl<SI_CHAR,SI_STRLESS,SI_CONVERTER>::Delete' :
> cannot convert parameter 1 from 'const char [13]' to 'const wchar_t *'
> 1> with
> 1> [
> 1> SI_CHAR=wchar_t,
> 1> SI_STRLESS=SI_GenericCase<wchar_t>,
> 1> SI_CONVERTER=SI_ConvertW<wchar_t>
> 1> ]
> 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
> 1>
> 1>Build FAILED.
> 1>
>
> 1>Time Elapsed 00:00:02.41
> ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========