Skip to main content
GameDev.net gamedev.net
🔒 Locked

Templates( C++)

Started by Guddi Jun 7, 2006 at 12:02 AM 1 replies 550+ views
Original Post
Guddi
Guddi
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 class ATL_NO_VTABLE CComClassFactoryProtocolCLSID : public CComClassFactoryProtocolT { 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
DudeMiester
DudeMiester
afaik, all you need to do is change it to " >" 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 >>).
[s] [/s]
I can see the fnords.
Guddi
Guddi
Thank you very much. That worked.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.