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 is the lowest address accessible and &vec[n] is the highest address accessible which is &vec + (n*sizeof(typeof(vec))) then if type is char, n should be able to hold the highest address - lowest address much like a pointer.