improve README.md, add close() and add example.cpp