I would choose method 2:
vec.assign(scpaInts.get(), scpaInts.get()+10);
As for a regular dynamic array:
int * a = new int[10]; ... vec.assign(a, a+10);
Of course, method 1 also works, for example, with a dynamic array:
vec.assign(&a[0], &a[9]+1);
As you can see, method 2 just looks simpler the better.
And no, there is no size() method in an array with scope.
Piotrnycz
source share