次のコードは、次のエラー メッセージを生成します。
bool UACmUsers::GetUser(int userid) {
soci::session sql(dbU::Connection());
sql << "SELECT userid, username, password FROM uac_users WHERE userid = \":user\"",
soci::use(userid),
soci::into(iDuserid, indUserid),
soci::into(sDusername, indUsername), // This is line 61.
soci::into(sDpassword, indPassword);
return true;
}
dbU::Connection()
接続文字列を生成する関数です。
iDuserid
、sDusername
、およびは、タイプおよびsDpassword
の UACmUsers のプライベート メンバーです。int
std::string
indUserid
、indUsername
、およびindPassword
は、タイプ の UACmUsers のプライベート メンバーですsoci::indicator
。
を検索する 2 番目のオーバーロードされた関数がありusername
ます。この関数をコメントアウトして 2 番目の関数だけを残すと、コンパイラは 2 番目の関数の同じポイントを指します。
bool UACmUsers::GetUser(const wxString& username);
インジケーターを 2 つ削除しようとしましたが、問題は解決しません。
エラー:
E:\cpp\lib\soci\soci-4.0.0\include\soci/exchange-traits.h(41): error C2065: 'x_type': undeclared identifier
E:\cpp\lib\soci\soci-4.0.0\include\soci/bind-values.h(207): note: see reference to class template instantiation 'soci::details::exchange_traits<T>' being compiled
with
[
T=wxString
]
E:\cpp\lib\soci\soci-4.0.0\include\soci/bind-values.h(143): note: see reference to function template instantiation 'void soci::details::into_type_vector::exchange_<wxString,soci::indicator>(const soci::details::into_container<wxString,soci::indicator> &,...)' being compiled
E:\cpp\lib\soci\soci-4.0.0\include\soci/statement.h(50): note: see reference to function template instantiation 'void soci::details::into_type_vector::exchange<wxString,soci::indicator>(const soci::details::into_container<wxString,soci::indicator> &)' being compiled
E:\cpp\lib\soci\soci-4.0.0\include\soci/statement.h(199): note: see reference to function template instantiation 'void soci::details::statement_impl::exchange<wxString,soci::indicator>(const soci::details::into_container<wxString,soci::indicator> &)' being compiled
E:\cpp\lib\soci\soci-4.0.0\include\soci/ref-counted-statement.h(92): note: see reference to function template instantiation 'void soci::statement::exchange<wxString,soci::indicator>(const soci::details::into_container<wxString,soci::indicator> &)' being compiled
E:\cpp\lib\soci\soci-4.0.0\include\soci/once-temp-type.h(49): note: see reference to function template instantiation 'void soci::details::ref_counted_statement::exchange<const soci::details::into_container<wxString,soci::indicator>>(T &)' being compiled
with
[
T=const soci::details::into_container<wxString,soci::indicator>
]
E:\cpp\dev\Manager\src\UAC\models\UACmUsers.cpp(61): note: see reference to function template instantiation 'soci::details::once_temp_type &soci::details::once_temp_type::operator ,<wxString,soci::indicator>(const soci::details::into_container<wxString,soci::indicator> &)' being compiled
SOCI の動作を手伝ってくれる人はいますか?