In function `int main()':|
|14|error: `postfix2exptree' undeclared (first use this function)|
|14|error: (Each undeclared identifier is reported only once for each function it appears in.)|
|15|error: `inorder' undeclared (first use this function)|
|16|error: `preorder' undeclared (first use this function)|
|17|error: `postorder' undeclared (first use this function)|
|18|error: `evaluatetree' undeclared (first use this function)|
||=== Build finished: 6 errors, 0 warnings ===|
Does anyone know how to help me? I am honestly stumped...
Okay, new problem! I was researching on what those errors meant. Someone said this "The compiler found a symbol that is being used but was not declared as a particular type of variable. The compiler therefore does not know how to treat it or what memory should be allocated for it. " So I meddled with the code a bit... It now looks like this:
BUUUT!!! there are now new errors popping up! this time its... wait for it! i feel so stupid already! its "14 expected primary-expression before '.' token ". The other lines are like that as well! I have honest to goodness no idea what's wrong! help please! thanks!
When you make a variable of type *r, you are creating a pointer to a node, so on the next lines, you are accessing "node" which doesn't exist. You would have to create a node object, point r to it, and then modify r (or just create the object and modify it)