In Stroustrup book we read:
But here we seeOriginally Posted by Bjarne StroustrupWhy he used unsigned int for "size" parameter? BTW what is the type of indexer? It should be as large as a pointer I think as it can access whole memory.Originally Posted by Bjarne Stroustrup
If &vec[0] is the lowest address accessible and &vec[n] is the highest address accessible which is &vec[0] + (n*sizeof(typeof(vec[0]))) then if type is char, n should be able to hold the highest address - lowest address much like a pointer.