With the following code I am recieving the error in the first parameter of strcmp
Code:
void strip(char original[], char stripped[]){
// Remove whitespace characters
for(int i = 0;i < original[i]; i++){
if(strcmp(original[i],"a")==0){
printf("Found an a");
}
}
}
[code]passing arg1 makes pointer from integer without a cast[code]
Main....
Code:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void strip(char original[], char stripped[]);
void reverse(char before[], char after[]);
#define SIZE 100
int main(void){
char original[SIZE];
char stripped[SIZE];
printf("Please enter a string: ");
gets(original);
printf("\nYour string was: %s", original);
strip(original, stripped);
return 0;
}