|
Boost Users : |
From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2006-11-20 04:41:47
me22 wrote:
> On 11/17/06, Thorsten Ottosen <thorsten.ottosen_at_[hidden]> wrote:
>
>>> typedef vector<int> VI;
>>> VI v(10);
>>> int data[] = {0,1,2,3,4,5,6,7,8,9};
>>> copy(data,data+10,v.begin());///inserted a few int to std::vector<int>
>>
>>Hm... this is not legal.
>>
>
> Sorry, why?
>
> The constructor makes the size 10, so isn't there space to copy in the
> 10 elements?
Right. My bad.
-Thorsten
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