Getting a weird syntax error. Can't put my finger on why. I have a struct TreeNode that holds a string and 2 pointers. I'm trying to write a function that returns a pointer to a TreeNode, but I'm being told that there's something wrong with the function declaration.
Here's the code:
1 2 3 4
TreeNode * WordTree::findNode(string input){
TreeNode ralph;
return ralph
}
And the error:
1 expected constructor, destructor, or type conversion before '*' token
1 expected `,' or `;' before '*' token
Here's the way I declare it in the header under private:
TreeNode * findNode(string input);
For greater context, here's the code surrounding that code (note: when I comment out the findNode() function the whole thing compiles without a problem):