Hi, I’m new to using Dynamic C and Rabbit technology, but as a kind of ‘hello world’ type of application I’ve been trying to make a function to translate a char* plain-text alphanumerical message into a string of morse code (using dots, dashes, slashes, and spaces). I’ve already implemented the functions which translate a single character into morse code, and which interpret a morse-code string and make one of the module’s LEDs flash the morse code.
However, attempting to iterate through each character in the char* to translate into morse code and then concatenate it to a longer string, I’ve come across a problem with Dynamic C’s strcat() function.
strcat() doesn’t remove the \0 from the end of the first string before appending the second, so the null-terminated string essentially remains the same. What’s the easiest way to correct this problem?
Thanks in advance for any suggestions.