I am using fgetc to read a file and then take and input a space after each character read. That part works fine, but I want to get the \n to input into my array. For some reason it doesn't get it. Does fgetc read a \n
btw buffer is declared as char buffer[3]; thanxCode:while((c=fgetc(ffile))!=EOF){ if(c=='\n'){ /*this doesn't work*/ buffer[0]='\n'; } else{ buffer[0]=c; buffer[1]=' '; buffer[2]='\0'; }



LinkBack URL
About LinkBacks


