当我尝试编译以下代码时,我得到了标题中提到的错误:
void Sql::select(const string table, const string column, const string condition, const string condition_2, const string condition_3) {
otl_stream s;
otl_column_desc* desc;
int desc_len;
const string select = str(format("SELECT %2% FROM %1% WHERE LEFT(%3%, 8) < %6% AND %4% = 'Ausstehend' AND (%5% = '1' OR %5% = '2') ")
% table % column % condition % condition_2 % condition_3 % getDate());
// cout << select;
try {
s.open(10, select.c_str(), con);
} catch (otl_exception &e) {
cerr << e.msg;
}
desc = s.describe_select(desc_len);
}
我被告知 otl_column_desc* desc 已设置但未使用。你能告诉我那里出了什么问题吗?