Example of how to serialize, deserialize and store a binary tree in C++