A simple C++ practice for writing my own string class