Suppose I have something like
char *threeDays[3] = {"Monday","Tuesday","Wednesday"};
and I wanted to extract the first letter of each string and create another string using those letters. How would I go about doing it? I tried
char str[4];
strcpy(str,*(threeDays+1));
strcat(str,*(threeDays+2));
but that gives me "TuesdayWednesday". I just want a string with the first letters ("MTW"). Can anyone help?
Note: I cannot use the string class. I have to use c-strings.