class List{
public:
List();
void add(int x);
void remove();
void display();
void findingEvens(Node* n, Node* &h);
private:
struct Node{
Node* next;
int data;
};
Node* head;
};
I have the above code in my header class, in the member function
void findingEvens(Node* n, Node* &h);
The problem is in the main class it gives an error for the following code besides I've already include the list.h,
Node *result = 0;
cout << findingEvens(l, result);
l.display();
As an error it says that
error: ‘Node’ was not declared in this scope
But to declare it in this scope I've already include the list.h class. Am I wrong?