Problem with binary tree

Hi,
I have a problem. I have created a function that takes a (Node* root). But in main I do not know how to call that function. Anyone can help?
well, if main looks like this:

Node * root = new Node;
foo(root); // like this

alternate:
Node root;
foo(&root);
I am making it in project. In main I have not declared class nether the Node or root. It is in separate .h file. And I am having a trouble making that(testing) in main.cpp
that does not tell me much.

did you include your header in main and add the .cpp file to the project? Where is the root variable?
Last edited on
Yes, I have made a declaration in header and implementation in another cpp. All is included.
PajaPatak, please show your .h and .cpp files. It's hard to know what's wrong without them.
I agree, but, this sounds more like a how to compile or set up a project problem (?).
What tools are you using, what OS? What exact error are you getting? Is it a compile error, or a linker error? Show the output from your compiler/linker/etc where it went wrong. The more you can tell us about what you need, the faster you will be up and running.
Topic archived. No new replies allowed.