I have an assignment that is the following:
For a given integer array, find the sum of its elements and print out the final result, but to get the sum, you need to e
In this line:
vector v(array[0], array[10]);
You've indexed out of bounds of your array. This causes undefined behavior.
Also, the constructor for vector you used doesn't do what you think. You've used:
vector(initial value, count);