change message buffer from c string to c++ string