the code below is part of my program. For some reason, I can't get the outermost for loop to increment. the outermost loop - for (i=1; i < file_len_suffix+1; i ++){ does not get incremented. what did i do wrong?
Code:
if (file_len_suffix>0){
infile = fopen (file6suffixes, "r");
outfile = fopen (filename4, "a");
for (i=1; i < file_len_suffix+1; i ++){
fscanf (infile, "%s", & cum_suffixes [i]);
printf ("\n%s\n", & cum_suffixes [i]);
suffixcomp = strncmp (cum_suffixes[i], the, 4);
if (suffixcomp==0){
for (i=1; i < file_len+1; i ++){
for (j=1; j <file_len_v+1; j++)
fprintf(outfile, "the %s %s.\n", cum_nouns[i], cum_verbs[j]);
}
}
suffixcomp = strncmp (cum_suffixes[i], to, 3);
if (suffixcomp ==0){
for (i=1; i<file_len-1;i++){
for (j=1; j<file_len_v+1; j++)
fprintf(outfile, "%s %s to the %s", cum_nouns[i], cum_verbs[j], cum_nouns[i+1]);
}
}
}
fclose (infile);
fclose (outfile);
}