Sample Implementation on String class in C++