I'm trying to implement a stack using a linked list, my Node struct is the private data of my ListStack class. When i try and use Node in my main.cpp it says that Node is an undeclared identifier. By the way i'm using this stack and everything to implement a RPN calculator and i have 3 files calculator.h, calculator.cpp, and main.cpp(if that is relevant)
Here is the struct:
struct Node
{
double data;
Node* under;
};
Node* top;
I have included the .h file(calculator.h) with #include "calculator.h"
The first statement it doesn't recognize is Node* current= top;
it also does not recognize top. Any reason for this? I'm kind of new to this site so sorry if I haven't included enough information.