hello2001
December 8th, 2005, 04:57 PM
hi,
char MorseData[] = ".- -...-.-.-.. . ..-."\
"--. ...... .----.- .-.."\
"-- -. --- .--.--.-.-. "\
"... - ..- ...-.-- -..-"\
"-.----.. ";
i have four space for each morse code for e.g. A is ".- "
i try to use pointers to allocate morse to a-z but still i can't make it work..
The program must use one of the character strings above and should include a function to accept a letter and return the equivalent Morse code for the letter.
i need to use pointers to get each morse all the morse code will be same size four space..
i try to use this functions :
strcpy(string1, string2) the prototypes are held in string.h
i try to converted into its integer ASCI code by a simple arithmetic operation.
but still i can't it to work.. please help with this i real need help..
thank's
char MorseData[] = ".- -...-.-.-.. . ..-."\
"--. ...... .----.- .-.."\
"-- -. --- .--.--.-.-. "\
"... - ..- ...-.-- -..-"\
"-.----.. ";
i have four space for each morse code for e.g. A is ".- "
i try to use pointers to allocate morse to a-z but still i can't make it work..
The program must use one of the character strings above and should include a function to accept a letter and return the equivalent Morse code for the letter.
i need to use pointers to get each morse all the morse code will be same size four space..
i try to use this functions :
strcpy(string1, string2) the prototypes are held in string.h
i try to converted into its integer ASCI code by a simple arithmetic operation.
but still i can't it to work.. please help with this i real need help..
thank's