我为'next'和'previous'变量得到了一个不完整的类型错误.我不确定我做错了什么,因为我在用C++编写类时非常生疏.任何帮助,将不胜感激!谢谢.
#include<iostream>
using namespace std;
class LinearNode
{
public:
//Constructor for the LinearNode class that takes no arguments
LinearNode();
//Constructor for the LinearNode class that takes the element as an argument
LinearNode(int el);
//returns the next node in the set.
LinearNode getNext();
//returns the previous node in the set
LinearNode getPrevious();
//sets the next element in the set
void setNext(LinearNode node);
//sets the previous element in the set
void setPrevious(LinearNode node);
//sets the element of the node
void setElement(int el); …Run Code Online (Sandbox Code Playgroud)