First, you need to pick whether you're using C or C++. The only thing in here that's particularly C++ is your use of cin and cout. Those are not allowed in C. If you want to use C++, you should post your question in the C++ forum. I'm going to pretend you mean to write C just to answer your question.
As for the root1 unused, here's the line in question:
Code:
root1 = newnode1(root1);
Before you can assign the result of newnode1() to root1, newnode1 must be called. When it's called, a copy of the current (uninitialized) value of root1 is passed in for use. The compiler is warning you about using the value unitialized. Your declaration line only sets root2 to NULL, the rest have random, garbage values in them. You need to initialize each one to NULL if that's what you want:
Code:
tree root = NULL;
tree root1 = NULL;
tree root2 = NULL;