帮助双链表?

| 我有一个类LinkedList clas,它有一个叫做Node的类。
class Node {
public:
Node() { next = NULL; prev = NULL; }
~Node() {}
public :
Node *next;
Node *prev;
T data;


 };
在同一个LinkedList类中,我具有以下函数定义,因为它们都在头文件中
 public:
LinkedList();
~LinkedList();

// methods -- note that the return values are of type T. Don\'t return a Node!
  void append(T item);
  T get(int idx);
  void insert(int idx, T item);
  void map(T (*pf)(T item));
  T remove(int index);
  int size();
  void unshift(T item);
不,我正在尝试执行操作 首先,我需要返回一个新的空链表。 请帮助,我尝试了很多事情 会这么简单吗
LinkedList<T>::LinkedList() {

head = NULL;
current = NULL;

}
    
已邀请:
会这么简单吗?
LinkedList<T>::LinkedList() {
    head = NULL;
    current = NULL;
}
是。     

要回复问题请先登录注册