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
The array has 10 elements so 10 is not a valid array index.
10
vector v(array[0], array[10]); ^^
What you want is:
vector v(array, array + sizeof(array) / sizeof(int) );