char and string variables for Morse Code sketch

Give this a try:

// from within your setup()
   char myMessage[100];
   int bytesRead;

   while(Serial.available()) {
      bytesRead = Serial.readBytesUntil('\n', myMessage, sizeof(myMessage) - 1);
      myMessage[bytesRead] =  '\0';    // Make it a string
      PlayTheString(myMessage);        // Use the input
   }

This code reads what is typed into the Serial monitor until the Enter key is pressed. It will only accept up to 99 characters, reserving one byte for the null. Next we add the null to the array to make it a C string. (Note lowercase 's' in "string". I'm not a big fan of String objects.) Then you call whatever function you have written that "plays" the string in Morse. By passing the string to your decoder function, it uses the data before it goes out of scope, as AWOL mentioned.