graph and binary tree(c++)