const int NUMB = 4;
int n[] = {5,6,7,8};
// create a vector of strings using the n[] array
vector<int> partnums(n, n + NUMB);
The class functions vector name(src.begin, src.end)
Create a vector initialized with elements from a source container beginning at src.begin and ending at scr.end
According to the book,
The vector partnums is declared as a vector type int and initialized with elements from the n array, starting with the first array element n[0], and ending with the last array element, located at position n + NUMB.
I don't get it, still. "Located at position n+ NUMB, isn't the index starts at 0? Or the compiler knows that this src.end is referring to position 1 (scr.begin), and count that from that position in the array n, and count to the 4th position)?
Thank you