I am learning c++ and I am trying to better understand it. I was reading the msdn documents on how to use xml lite. it said that I must use a class that implements the IStream interface. It said to declare and instantiate my class that extends Istream and use CComPtr when declaring the varible. then it showed me the following.
CComPtr<IStream> pFileStream;
CComPtr<IXmlReader> pReader;
I am a tad bit confused. if CComptr is used to pull the xml. why do I have to extend . Why not just have CComptr already implement IStream and just call CComptr. Or does CComptr already have IStream and the only way for istream to be effective is to extend like above???