On Apr 5, 1:07 am, Abhishek Padmanabh
wrote:
> On Apr 4, 11:43 pm, xz
>
>
>
> > > But if you wanted that why would
> > > you start off with a plain 2D array in the first place.
>
> > If you wanna initialize a 2D vector (12x2) with the following data:
>
> > -5, -5,
> > -5, 105,
> > 105, 105,
> > 105, -5,
> > 60, -5,
> > 60, 40,
> > 70, 40,
> > 70, 60,
> > 30, 60,
> > 30, 40,
> > 40, 40,
> > 40, -5,
>
> > How do you do that?
>
> If that is the case, then why do you want to use a vector at all? Why
> don't you work with the arrays only or something like boost:array?
> vectors are not a complete replacement of arrays especially when
> arrays know their size (and they don't grow) and elements at the time
> of creation.
What if I want to use some function that reads vector instead of
array?