void processWord(char * word) {
if(word != NULL) {
char * temp = word;
char final[32];
int index = 0;
while(*temp) {
if((*temp >= 65 && *temp<=90) || (*temp>=97 && *temp<=122)) {
final[index++] = toupper(*temp);
}
temp++;
}
final[index] = '\0';
strcpy(word, final);
}
}
Try to get ride of non alphabet characters and convert to upper case. Problem is at the strcpy line. Final ends up as what it should be, it just wont copy into word, I get a segmentation fault. I've got the #includes I need and the line works just fine if I swap "word" and "final". Pls help someone <3