20 Nov
2006
20 Nov
'06
9:41 a.m.
me22 wrote:
On 11/17/06, Thorsten Ottosen
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