What's my problem? C++ problem
- Vous devez vous identifier ou créer un compte pour écrire des commentaires
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]
}
^
This is the wrong place to post but you don't have matching curly braces
- Vous devez vous identifier ou créer un compte pour écrire des commentaires