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

problem with heritage

Started by joltios Jan 12, 2005 at 9:57 AM 0 replies 650+ views
Original Post
joltios
joltios
I try to do basic log system with next code: Jlog.h: #include::iterator it = logs.begin(); for(;it != logs.end(); it++) { (*it)->Log(text); } protected: Jlog() { logs.push_back(this); } virtual ~Jlog() { logs.remove(this); } private: static list logs; }; list Jlog::logs; Jsreenlog.h: #include"Jlog.h" #include class Jscreenlog : public Jlog { public: virtual void Log(string text) { screen_log_text += text; } string Get_Text() { return screen_log_text; } Jscreenlog() {} virtual ~Jscreenlog() {} private: string text; }; Complimer message is: 8 C:\Documents and Settings\Jouni Takalo\Omat tiedostot\Puuk\Jscreenlog.h base class `Jlog::Jlog' has incomplete type I get that weird error can someone tell me what is actual wrong.

Topic Locked

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

Sign in to reply to this topic.