小编Mos*_*eda的帖子

'const struct list :: SingleList'的前向声明,无效使用不完整类型'list :: SingleList'(编译错误)

SingleList.h

#include "ListBase.h"
#include "DataNode.h"
#include "SingleListIterator.h"

namespace list
{
    class SingleListIterator;
    class SingleList : public ListBase
    {
        private:
            DataNode *head;
            DataNode *tail;
        public:
            SingleList();
            SingleList(const SingleList &obj);
            ~SingleList();
            void Flush(); //deletes all elements in the list
            void PushInFront(const int data); // **
            void Append(const int data); // **
            void DeleteLast();
            void DeleteFirst();
            int Delete(const int& data); // ** remove the first occurrence of data and return 1 otherwise 0
            const int& GetFirst() const; // **
            int& GetFirst(); // ** …
Run Code Online (Sandbox Code Playgroud)

c++ compiler-errors

3
推荐指数
1
解决办法
5437
查看次数

标签 统计

c++ ×1

compiler-errors ×1