[Quickfix-developers] a small bug in tradeclient, (or gcc????)
Brought to you by:
orenmnero
From: Clark S. <cla...@ya...> - 2004-06-07 19:49:49
|
In the querycancelreplace41 function, somehow Price and Quantity were not being added to the final message, even though I entered them in manually. By commenting out the calls to queryConfirm I got the function working properly. To my eye, the code looks fine, lol but my eyes are far from perfect! There might be some bug in gcc or the default template library I don't know. I had this problem with gcc-2.95 on Debian woody. This is how I got the function to work: FIX41::OrderCancelReplaceRequest Application::queryCancelReplaceRequest41() { FIX41::OrderCancelReplaceRequest cancelReplaceRequest( queryOrigClOrdID(), queryClOrdID(), FIX::HandlInst( '1' ), querySymbol(), querySide(), queryOrdType() ); //if ( queryConfirm( "New price" ) ) cancelReplaceRequest.set( queryPrice() ); //if ( queryConfirm( "New quantity" ) ) cancelReplaceRequest.set( queryOrderQty() ); queryHeader( cancelReplaceRequest.getHeader() ); //if (tradeclient_cfg_file == "cfg/arca.cfg") { // querysession( cancelReplaceRequest); //} { std::cerr << "line = " << __LINE__ << endl; FIX::Price price; FIX::OrderQty orderqty; try { cancelReplaceRequest.get( price); std::cerr << "price = " << price.getString() << endl; } catch (...) { std::cerr << "price not found" << endl; } try { cancelReplaceRequest.get( orderqty); std::cerr << "orderqty = " << orderqty.getString() << endl; } catch (...) { std::cerr << "orderqty not found" << endl; } } return cancelReplaceRequest; } --------------------------------- Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger |