What's my problem? C++ problem

1 reply [Last post]
Mr_Robot
Offline
Joined: 08/15/2015

https://pastebin.com/pUdM6ZGS

Stack.h:12:3: error: ‘Cell’ does not name a type
Cell *m_firstCellPtr; // m_firstCellPtr field is a pointer to the first cell of the linked list holding the values of the stack
^
Stack.cpp: In member function ‘int Stack::top()’:
Stack.cpp:29:25: error: ‘class Cell’ has no member named ‘getValue’
return m_firstCellPtr->getValue(); // we return the top value, which is stored in the first cell in the linked list
^
Stack.cpp: In member function ‘void Stack::pop()’:
Stack.cpp:37:35: error: ‘class Cell’ has no member named ‘getNext’
m_firstCellPtr = m_firstCellPtr->getNext();
^
Stack.cpp: In member function ‘int Stack::top()’:
Stack.cpp:30:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^

Patrick Mc(avery
Offline
Joined: 08/15/2011

This is the wrong place to post but you don't have matching curly braces