I have two classes declared as below
and When I try to compile it it gives the following error:
.class does not name a type' for(Node) and (List)
.expected class-name before ';' token for (~List)
. expected declration before };
. Please help me in this regard.
Code:
#include<iostream>
using namespace std;
Class Node
{
double data;
Node* Next;
};
Class List
{
public:
bool ISEmpty()
{
return head == NULL; //return function value ,determine if empty or not
}
Node*InsertNode(int index,double x); //procedure: insert a new Node at a particular position
int FindNode(double x); // procedure: search for node with a given value
int deleteNode(double x) //procedure: delete Node with a given value
void Display(); // procedure: printing all nodes in the list
List()(head = NULL;} //constructor
~List; //destructor
};
and When I try to compile it it gives the following error:
.class does not name a type' for(Node) and (List)
.expected class-name before ';' token for (~List)
. expected declration before };
. Please help me in this regard.
Comment