Skip to content

Commit 42fb8cb

Browse files
committed
更新xtp example
1 parent ee857d1 commit 42fb8cb

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

example/cpp/XTP/example_xtp.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -289,20 +289,20 @@ int main(int argc, char *argv[])
289289
trade_server_info.Port = 6001;
290290

291291
// 注意,这里要填入用户名,密码和key
292-
strcpy(user_info.UserID, "userid"); // 用户名
292+
strcpy(user_info.UserID, "userid"); // 用户名
293293
strcpy(user_info.Password, "password"); // 密码
294294
user_info.ExtInfoInt32 = p->client_id_; // 自定义 client_id
295-
strcpy(user_info.ExtInfoChar64, "xxxxxxxxxxxxxxxxxxxxxxxx"); // key
295+
strcpy(user_info.ExtInfoChar64, "xxxxxxxx"); // key
296296

297297
CXApi* p_api_quote = CXApi::CreateApi(shared_lib_quote);
298298
CXApi* p_api_trade = CXApi::CreateApi(shared_lib_trade);
299299

300-
// if (!p_api_quote->Init())
301-
// {
302-
// printf("%s\r\n", p_api_quote->GetLastError());
303-
// p_api_quote->Disconnect();
304-
// return 1;
305-
// }
300+
if (!p_api_quote->Init())
301+
{
302+
printf("%s\r\n", p_api_quote->GetLastError());
303+
p_api_quote->Disconnect();
304+
return 1;
305+
}
306306

307307
if (!p_api_trade->Init())
308308
{

0 commit comments

Comments
 (0)