Code:
int len;
char ant[size];
do{
fgets(ant,size,file1);
for(len=0;len<size;len++){
if(ant[len]=='a'){fprintf(file2,"[*]");}
}
while(ant!=EOF);
i know this wont work because the compiler says cannot convert char to int or whatsoever
but ive tried to do it with one character at the time but didnt worked as well
so wath im trying to do is read a string from file1 and then i say if an 'a' is in the string ant then it has to fprintf[*] in file 2
now this works but it oly works for the first line of file1 so i was thinking ill just add do while(ant!=EOF) but it seems that that wont work ....
any suggestions would be welcome