新手咨询OnRspQryTradingAccount

Discussion in 'CTP' started by skyline, May 20, 2011.

  1. void CTraderSpi::OnRspQryTradingAccount(CThostFtdcTradingAccountField *pTradingAccount, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
    {
    cerr << "--->>> " << "OnRspQryTradingAccount" << endl;
    cerr << "--->>> " << pTradingAccount->AccountID << endl;
    if (bIsLast && !IsErrorRspInfo(pRspInfo))
    {

    ///请求查询投资者持仓
    ReqQryInvestorPosition();
    }
    }

    怎么调用账户数据?
    我在交易样例中增加一句输出就出错
    cerr << "--->>> " << pTradingAccount->AccountID << endl;