I'm trying to implement an N-ary Tree in c++ using the glib, but as I'm not a c++ expert, I'm having some problems finding out how to use it right. Does anybody have a simple example written in C++ to help me understand how to use the basic functions? I'm having special problems with g_node_traverse, I just can't get the GNodeTraverseFunc right.
You can find the description of the N-ary Tree here: http://developer.gnome.org/glib/stable/glib-N-ary-Trees.html
I found some examples in c, but I couldn't manage to translate them correctly into c++ here:
http://www.ibm.com/developerworks/linux/tutorials/l-glib/section7.html
Tried with the last piece of code for n-ary trees.
I appreciate your help.