This doesn't work because, getch() requires key_press to be a CHAR and strcat() requires key_press to be a CONST CHAR (String).Code:key_press = getch(); strcat (spell_word, key_press);
Any way around that?
This doesn't work because, getch() requires key_press to be a CHAR and strcat() requires key_press to be a CONST CHAR (String).Code:key_press = getch(); strcat (spell_word, key_press);
Any way around that?
Sent from my iPadŽ
Something like this
You could also keep track of the length of the string somewhere to be more efficant.Code:key_press = getch(); for (int i=0;spell_word[i];i++); spell_word[i]=key_press spell_word[i+1]=0;