Use C++ Stream I/O for EditData

This took quite a lot of effort, but I learned a lot. Finally I have fulfilled @looki 's request!