First page Back Continue Last page Overview Graphics
countof() for MFC containers
Microsoft containers typically use the member function GetCount() rather than size() to provide the number of elements
- The stl template won’t work for them
Most of them are derived from CObject
Function call overloading tricks can be combined with templates to create a smooth countof() interface that includes C arrays, the MFC CArray as well as std::vector