So, let us look at an example using STL, using a vector using from the standard library iostream, which of course we've used. The name space STD indicates that what we're dealing with is indeed a standard library again if name space was something else, it might be a local corporation library. You might have using namespace ATT. If the ATT people wanted to create their own versions. So here we have vector. Vector is a template that's why it's the standard template library and remember template is all about generic programming. So STL is heavily invested in using templates. Indeed two of the techniques that STL takes advantage of. To get, some of their efficiency and generality, is the use of templates throughout and the use of inlines throughout. STL has a major design criteria as to try and get things that are nearly as efficient as they can be even if they were hand-coded. Especially hand coded. And here's some example code. This is the usual idiom. It's an idiom both for vectors but also vectors can be treated like arrays. Now, this was used for initialization. And this is more a C style idiom. Here, you're getting a C++ style idiom. Here you see that you have this notion of iterator this generalization of pointer. We also some time call it cursor, understand that it's looking at a position. We have these special functions v.end(), so that v.end() is always sort of the sentinal so end() identifies. Where we are finished with our computation, where we're finished with our sequence. So it's like less than 100. 100 there is a sentinal, that means we can look up to 99, so there is no v[i ] of i =100, , there would not be a v [ 100 ]. of 100. v[100] is instead it's one passed. So think of it as one passed (the actual last element v[99]). One element passed. and we de-reference p which gets us the contents of whatever that container is. And then we use it in whatever way we want. In this case it's just for output. So again, here are two of the standard idioms. Both are in use, and our coding style. But we want you to move on to this (using iterators) and we'll, hopefully explain why that has value. But STL relies a lot, on the second idiom and throughout its code. So, the Iterator logic is fundamental to the use of the standard template library. As I stated, p is conceptually a pointer, and the two end-points define range. begin() is actually the starting element. It stores a value. But v.end() doesn't store a value. v.end() is a sentinel that says we're one passed where we should be. So we're always testing v.end() with a not equal logic. p != v.end() is what's very typical.