Archived

This topic is now archived and is closed to further replies.

tj963

Unknown Error

Recommended Posts

Hi, I got this strange error: error C2061: syntax error : identifier ''TDispObj'' The problem is I can''t find the problem and it isn''t in the help files. It''s in a class (only relavent code included): #include "DispObj.h" class D3DObject { public: D3DObject(); void AddDispObj(TDispObj* Obj); // Generates the error ... private: ... }; In DispObj.h: class TDispObj { virtual TError* Draw() = 0; virtual TError* Create() = 0; virtual void Release() = 0; int mOrder; }; I don''t understand at all where the error is coming from. I have other similar references all over the place but for some reason it doesn''t like this one. The TDispObj is an abstract base class which I derive other objects from so they all have the same interface so I can call the in a loop without knowing their type. Any suggestions would be appreciated. Tim

Share this post


Link to post
Share on other sites
Thanks a lot. I wasn''t searching with the C on it. I don''t understand how that relates to my problem though. It says local function definitions are illegal. I''m just trying to define a function as part of a class. Thanks a lot for helping me find that in MSDN though.

tj963

Share this post


Link to post
Share on other sites