#include <iostream>
#include <stdlib.h>
#include "stdafx.h"
#include "funcs.h"
#include "request_handler.h"
#include <fstream>
#include <sstream>
#include <string>
#include <boost/lexical_cast.hpp>
#include "reply.h"
#include "request.h"
#include "Client.h"
#include "Server.h"
#include "Alliance.h"
#include "AllianceCore.h"
#include "Map.h"
#include "City.h"
#include "Hero.h"
#include "Tile.h"
using namespace std;
using namespace Poco::Data::Keywords;
{
gserver->consoleLogger->information("Account doesn't exist");
Session ses(gserver->serverpool->get());
Statement select(ses);
select << "SELECT * FROM `accounts` WHERE `username`= ?;", use(userName);
select.execute();
RecordSet rs(select);
}
vs2012不断发出错误c3861:
'use':找不到标识符
我试过谷歌搜索答案,但几乎不可能在搜索中包含“使用”一词。所以我向stackflow的专业知识屈服,试图帮助我。 “使用”就是这样的
use(username);
是为多条线路发出错误但它始终设置相同“使用(无论名称或字符串等)”
提前感谢。
答案 0 :(得分:0)
尝试
using namespace Poco::Data::Keywords
//...
select << "SELECT * FROM `accounts` WHERE `username`= ?;", use(userName);
或
select << "SELECT * FROM `accounts` WHERE `username`= ?;", Poco::Data::Keywords::use(userName);