No output got after execution.

Posted by wilson88 on Stack Overflow See other posts from Stack Overflow or by wilson88
Published on 2010-05-15T07:25:06Z Indexed on 2010/05/15 7:34 UTC
Read the original article Hit count: 289

Filed under:
|

I am still stuck with getting output for a copied vector. Probably something am not doing right. I get no output.

void Auctioneer::accept_bids(const BidList& bid){    
     BidList list;
     BidList list2;
     BidList::const_iterator iter;
     copy (list.begin(),list.end(), back_inserter(list2));

      for(iter=list2.begin(); iter != list2.end(); iter++)
    {
     const Bid& bid = *iter; // Get a reference to the Bid object that the iterator
     points to
     cout << "Bid id  : " << bid.bidId << endl;
     cout << "Trd id  : " << bid.trdId << endl;
     cout << "Quantity: " << bid.qty << endl;
     cout << "Price   : " << bid.price << endl;
     cout << "Type    : " << bid.type << endl;
    }
}

© Stack Overflow or respective owner

Related posts about c++

Related posts about homework