![]() for ( it = m.begin() it != m.end() it++ ) cout first second << endl // check, if needed String encode( string text ) // turn text into morse codeįor ( int i = 0 i second + SPACE // if in map, add to morse code, otherwise do nothing = void setMap() // set the mapping from characters to code String toMorse (string text, string morse)įor ( int index = 0 index < textlength index++) String morse = Ĭout << "Please enter a character, word or phrase to translate from english to morse code \n" Ĭout << "Here it is in morse code \n " << toMorse(text, morse) << endl #include #include #include using namespace std If i don't message back right away its because i'm currently going to a funeral at 6:30 and won't be near my pc till after it but i will message back as soon as possible thank you for your time. The second is that while i have the mores code for the numbers with in the string mores the computer doesn't recognize them and as a result crashes is there a way for me to fix this?Īnd finally my teacher doesn't want me to use string toMorse (string, string) but instead wants me to use string toMorse(char) for the function which doesn't really make sense to me as char would only allow for a single character wouldn't it so the final question is how would i use char instead of string string and still keep it to where i can enter a line of text and it would still out put a line of mores code and if a full line isn't possible how would i do it even with only the single character sorry this is an online class and as you can see im still very new to coding The flashing light and download buttons do not currently work when in "Telegraph" mode.Hello I have three questions: the first one is when I run my code and enter text for it when it returns its one letter short and as a result it doesn't give the correct morse code translation, i dont see where this problem is steaming from if you could just tell me the line so i can fix it i would be grateful. The "Configure" button reveals advanced options to control the frequency and speed and switch between telegraph and radio sound styles. You can choose between hearing the sound, seeing a flashing light, or having your phone vibrate using the "Sound", "Light" and "Vibrate" checkboxes. ![]() The "Play", "Pause", "Stop" and "Repeat" buttons control the playback. If a letter cannot be translated a "#" will appear in the output. The text translation will appear in the bottom box. Letters are separated by spaces and words by "/". You can type Morse code into the top box using "." for a dot and "-" or "_" for a dash. This is not a great tool for learning Morse code as looking at the dots and dashes does not help. ![]() ![]() ![]() Just type letters, numbers and punctuation into the top box and the Morse code will appear in the bottom box with a "#" if the character cannot be translated. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |