hi i had some help completing my assignment which i still dont understand fully.
i dont know what this bit of the code means/do.
the assignment was the morse code convertion.
if(cinput[i] == 0x0a || cinput[i] == 0x0a) {
cinput[i] = '\0';
break;
}
i had the chars and ints defined as follow
int i=0;
char c, d, cinput[80];
char alph[]="ABCDEFGHIJKLMNOPQR .........";
char *morse[] = {
".-" , "-..." , "-.-." , "-.." , "." , /* a-e */
"..-." , "--." , "...." , ".." , ".---" , /* f-j */
"-.-" , ".-.." ............................
then i had the following code resulting in an error msg if input is more than 80.
for(i = 0; i < 80; i++) {
cinput[i] = getc(stdin);
if(i >= 79) {
while( getc(stdin) != '\n');
then that bit of the code comes in which i still dont know what it does..
thanks ..