引用命名空间
·····
using namespace ::save_service
·····
函数内容
·····
void save_result(int a,int b)
{
printf(“Match Result : %d %d\n”,a,b);
std::shared_ptr[HTML_REMOVED] socket(new TSocket(“123.57.47.211”, 9090));
std::shared_ptr[HTML_REMOVED] transport(new TBufferedTransport(socket));
std::shared_ptr[HTML_REMOVED] protocol(new TBinaryProtocol(transport));
SaveClient client(protocol);
try {
transport->open();
client.save_data(“acs_1741”,”ad5d001e”,a ,b ); //调用保存函数
transport->close();
} catch (TException& tx) {
cout << “ERROR: ” << tx.what() << endl;
}
拦截时报错内容:
修改为save_client后编译时报错