Thread: Morse Code(Going the other way)

  1. #16
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Quote Originally Posted by lilbo4231 View Post
    thats what its supposed to be i believe
    That is what is supposed to be what? I could have meant either way. That was my whole point. How are you providing your input? You need to pick off each Morse-letter at a time and look up what actual character it translates to, and stick that in the string you are sending back.

    In my example, I did actually mean E T, not A, but you didn't know that, because I ran them together, illustrating the point I was making to you.


    Quzah.
    Hope is the first step on the road to disappointment.

  2. #17
    Registered User
    Join Date
    Feb 2011
    Posts
    33
    thanks guys so much for the help, why is it != 0 commontater?

  3. #18
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Do you know what it means for strcmp to return 0?

  4. #19
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Quote Originally Posted by lilbo4231 View Post
    thanks guys so much for the help, why is it != 0 commontater?
    Look up how the strcmp function works and you will have your answer.


    Quzah.
    Hope is the first step on the road to disappointment.

  5. #20
    Banned
    Join Date
    Aug 2010
    Location
    Ontario Canada
    Posts
    9,547
    Quote Originally Posted by anduril462 View Post
    Quzah brings up a good point. When one transmits morse code, there is often a slight pause between letters and a longer pause between words. In your code, perhaps you want to represent this by putting a single space between each letter, and perhaps 2 or 3 spaces between words.
    For mechanical morse... it's 1-3-3-6 ... dit is 1 time interval... dah is 3 ... letter spacing is 3 ... word spacing is 6 .

    A good operator with a steady "Fist" can reduce the letter and word spacing somewhat and still send very copyable morse.

  6. #21
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    My point was that he can't just run it all together and expect to be able to figure out what it means. That's like saying "A good programmer can translate 01010110101010101010101001101010" and know that I meant X chars and not Y ints! In other words, he needs to actually think about how he is supplying his input.


    Quzah.
    Hope is the first step on the road to disappointment.

  7. #22
    Registered User ssharish2005's Avatar
    Join Date
    Sep 2005
    Location
    Cambridge, UK
    Posts
    1,732
    That would make it a bit difficult to use comma and period.
    Yeah that does makes sense, but still think it might be achievable. Agreed it might be bit complex for the beginners

    ssharish
    Life is like riding a bicycle. To keep your balance you must keep moving - Einstein

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. morse code convertor
    By neandrake in forum C++ Programming
    Replies: 2
    Last Post: 04-29-2004, 10:53 AM
  2. Morse code conversion
    By viclaster in forum C Programming
    Replies: 6
    Last Post: 12-04-2003, 09:24 PM
  3. Morse Code Translator!
    By Paro in forum C++ Programming
    Replies: 4
    Last Post: 04-05-2002, 07:23 PM