stopped working run time error.. help plz... ;(
Code:
#include <stdio.h>
#include <conio.h>
int main()
{
FILE *search;
FILE *from;
FILE *out;
char cpy[4]="nono";
char fro[100][50];
char sear[50][50];
from=fopen("from.txt","r");
out=fopen("out.txt","w");
int i=0;
while(!feof(from))
{
fscanf(from,"%s",fro[i]);
i++;
}
strcpy(fro[i],cpy);
int j=i;
i = 0;
printf("ok");
search=fopen("search.txt","r");
while(!feof(search))
{
fscanf(from,"%s",sear[i]);
i++;
}
strcpy(sear[i],cpy);
int k=i;
int l=0;
i=0;
while(!feof(from))
{
while(fro[i] != "nono")
{
for(i; i <k; i++)
{
for(l; l<j; l++)
{
if(sear[l] == fro[i])
{
fprintf(out,"%s,",sear[l]);
}
}
}
}
}
getch();
return 0;
}