Exercise in Data Structure: rewrite C++ string class using linked list