Jump to content
  • Advertisement
Sign in to follow this  
Guddi

Templates( C++)

This topic is 4514 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi I am getting an error when I try to compile my code. I am using Visual C++ Express Edition. If anyone can help, I will really appreciate it. The code is: template <const CLSID* pclsid> class ATL_NO_VTABLE CComClassFactoryProtocolCLSID : public CComClassFactoryProtocolT<CComClassFactoryProtocolCLSID> { public: HRESULT GetTargetCLSID(CLSID& clsid); }; The error is on line two of the code above: error C3203: 'CComClassFactoryProtocolCLSID' : unspecialized class template can't be used as a template argument for template parameter 'T', expected a real type

Share this post


Link to post
Share on other sites
Advertisement
afaik, all you need to do is change it to "<CComClassFactoryProtocolCLSID<pclsid> >" is your inherited class. This is because without the pclsid, it's not a real class, just a template of one. Also, don't forget the space between the last two angle brackets. It's an error if you don't put it (reads as operatior >>).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!