char alphabet;
const char* morse
}
const MorseUnit morseList[] = {
{ 'A', ".-" }, { 'B', "-..." }, { 'C', "-.-." }, { 'D', "-.." },
{ 'E', "." }, { 'F', "..-." }, { 'G', "--." }, { 'H', "...." },
{ 'I', ".." }, { 'J', ".---" }, { 'K', "-.-" }, { 'L', ".-.." },
{ 'M', "--" }, { 'N', "-." }, { 'O', "---" }, { 'P', ".--." },
{ 'Q', "--.-" }, { 'R', ".-." }, { 'S', "..." }, { 'T', "-" },
{ 'U', "..-" }, { 'V', "...-" }, { 'W', ".--" }, { 'X', "-..-" },
{ 'Y', "-.--" }, { 'Z', "--.." },
{ '1', ".----" },{ '2', "..---" },{ '3', "...--" },{ '4', "....-" },
{ '5', "....." },{ '6', "-...." },{ '7', "--..." },{ '8', "---.." },
{ '9', "----." },{ '0', "-----" },{ ' ', "/" }
};
const int Morsesize = sizeof(morseList) / sizeof(MorseUnit); // the same as const int MORSE_SIZE = sizeof(morseList) / sizeof(morseList[0]);
void MTT(std::string &text, std::string &morse) {
text = '';
size_t start = 0; // size_t helps store large amount of DATA, instead of int we use size_t for storing non-negative values
size_t end = 0;
getline(cin, morse);
if ((!text.empty() || text.size() != 0) && (morse.size() != 0)) {
for (int i = 0; i < Morsesize; i++) {
for (int j = 0; j < Morsesize; j++)
std::cout << morse[i] << std::endl;
}
}
}
how can i let compiler know which morse character is what the english text in the given struct array, and make compiler translates it

data science