我正在进行这项任务,并且我继续收到一个明显先前声明的方法的错误.这是.h文件:
#ifndef DLLIST_H
#define DLLIST_H
#include <iostream>
#include <fstream>
#include <cstddef>
#include "DListNode.h"
typedef int ItemType;
class DLList
{
private:
friend std::ostream & operator<< (std::ostream & out, DLList & other);
int size;
int * head;
int * tail;
void _copy(const DLList * toCopy);
void _dealloc();
public:
DLList();
DLList(const DLList & toCopy);
~DLList();
DLList & operator=(const DLList & toCopy);
int size();
void append(ItemType item);
void insert(int index, ItemType item);
ItemType pop(int index);
ItemType pop();
const DListNode & operator[] (int idx);
}; …Run Code Online (Sandbox Code Playgroud)