#ifndef FOLDER_H_INCLUDED #define FOLDER_H_INCLUDED #include <string> #include <set> #include "Message.h" using namespace std; class Message; class Folder { private: set<Message*> q; public: friend class Message; void addMsg(Message* M) { q.insert(M); } void remMsg(Message* M) { q.erase(M); } void display() { for(auto w : q) w->show(); } }; #endif // FOLDER_H_INCLUDED
display()中的show()调用出问题了。
error: invalid use of incomplete type 'class Message'|