首页 新闻 会员 周边

c++ invalid use of incomplete type

0
悬赏园豆:50 [已关闭问题] 关闭于 2017-04-30 21:02
复制代码
#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'|

coyol的主页 coyol | 初学一级 | 园豆:83
提问于:2017-04-30 20:16
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册