I have a little problem with the strcat
function in C. All I want is, take a string (org_surname
), check that the character selected is a consonant and add it to another string(coded_surname
).
int lenght = strlen(org_surname); int i = 0; int count = 0;
while(i<lenght && count < 3){
if (org_surname[i] != 'a' && org_surname[i] != 'e' && org_surname[i] != 'i' && org_surname[i] != 'i' && org_surname[i] != 'u'){
strcat(coded_surname,org_surname[i]);
count++;
}
i++;
}
Errors is always the same.
"passing argoment 2 of strcat makes a from integer without a cast.
How can I solve this problem?