void Td::change_password(const std::string &new_password) {
CThostFtdcUserPasswordUpdateField reqUserPasswordUpdate = {};
strncpy(reqUserPasswordUpdate.BrokerID, m_brokerID.c_str(),
sizeof(reqUserPasswordUpdate.BrokerID) - 1);
strncpy(reqUserPasswordUpdate.UserID, m_userID.c_str(),
sizeof(reqUserPasswordUpdate.UserID) - 1);
strncpy(reqUserPasswordUpdate.OldPassword, m_password.c_str(),
sizeof(reqUserPasswordUpdate.OldPassword) - 1);
strncpy(reqUserPasswordUpdate.NewPassword, new_password.c_str(),
sizeof(reqUserPasswordUpdate.NewPassword) - 1);
m_reqID++;
m_tdApi->ReqUserPasswordUpdate(&reqUserPasswordUpdate, m_reqID);
}
登录以后再去修改密码