Boost logo

Boost Users :

Subject: Re: [Boost-users] boost.multi_index & IPC
From: Viatcheslav.Sysoltsev_at_[hidden]
Date: 2012-04-10 04:08:14


On Mon, 09 Apr 2012 14:44:10 +0200, 陈海峰 <chenhf2010_at_[hidden]> wrote:

> struct quote
> {
> public:
> int market;
> int kind;
> shm_string seccode;
> shm_string secname;
> float price;
> float zf;
>
>
> quote(int market_, int kind_, const char* seccode_, const
> char_allocator& a, const char* secname_, const char_allocator& b, float
> price_, float zf_):
> market(market_),kind(kind_), seccode(seccode_, a), secname(secname_,
> b), price(price_), zf(zf_)
> {}
> };
>

> std::vector<quote> result;
> result.push_back(q); this statement will compile error, why? how to

Unless I miss something in modern STL, you need copy constructor for quote.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net