I searched these forums and found many results for "strcat", and have been reading through them. However, after implementing what I have learned, I still can't get rid of this one warning message:
[Warning] passing arg 2 of `strcat' makes pointer from integer without a cast
Here is my code:
Code:
int mm;
int input_length;
char current_char;
char *corrected_char = malloc(80); // user input without ">"
input_length = strlen(aa[ii]);
input_length = (int) input_length - 1;
for(mm = 1; mm < input_length; mm++) {
current_char = aa[ii][mm];
printf("Character: %c\n", current_char);
strcat(corrected_char, current_char);
printf("New char: %c\n", *corrected_char);
}
ii++;
aa[ii] has a maximum size of 80 bytes. Each line in aa[ii] is something like ">hello" or any string, but it always begins with ">". What I am trying to do is strip the ">" and resave the string to a new variable, which would just contain "hello". Everything is working fine except for strcat(). I've tried making current_char a pointer but it doesn't work. Any ideas?