add write_chars.cpp