>>191
いまいち何がしたいのかわからんが、文字列の比較はstrcmp (#include<string.h>)を使うといい

if(filename=="\n"){return 0;}
↓
if(strcmp(filename,"\n")==0){return 0;}