Unknown Error

Started by
2 comments, last by tj963 22 years, 5 months ago
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
tj963
Advertisement
Have you looked up error C2061 in MSDN? It has some interesting information. Check it out.


I wanna work for Microsoft!
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
tj963
After much work, I discovered the problem was that I had circular include statements. Thanks for the help.

tj963
tj963

This topic is closed to new replies.

Advertisement