0_0_21299274_20470.cpp:3:5: error: 'stack' does not name a type
stack<TreeNode*>sta;
^
0_0_21299274_20470.cpp:4:23: error: expected ')' before '*' token
Solution(TreeNode *root) {
^
0_0_21299274_20470.cpp:10:5: error: 'TreeNode' does not name a type
TreeNode* next() {
^
0_0_21299274_20470.cpp:17:18: error: 'TreeNode' has not been declared
void goAlong(TreeNode *temp){
^
0_0_21299274_20470.cpp: In member function 'bool Solution::hasNext()':
0_0_21299274_20470.cpp:8:17: error: 'sta' was not declared in this scope
return !sta.empty();
^
0_0_21299274_20470.cpp: In member function 'void Solution::goAlong(int*)':
0_0_21299274_20470.cpp:19:13: error: 'sta' was not declared in this scope
sta.push(temp);
^
0_0_21299274_20470.cpp:20:26: error: request for member 'left' in '* temp', which is of non-class type 'int'
temp = temp->left;
^
|