C++ I/O for Erlang Heads