FancyZoom is a nice image lightbox plugin. Here is the simplest way to use it.
Its packed, but then I found the unpacked and improved version:
This example comes from the book of "Addison-Wesley, Designing Components with the C++ STL, Electronic 3rd Edition.pdf". Its a simple list implements an iterator in the class.
Look at each function carefully and get a clear idea of the mechnnism you will understand the core of the STL.