myString[0] = 0; <<<< What's that? You want to add a 0 to the end of the String? Use myString.concate( "0" );