Hi,i am writing a program which among the others,it has to store all the words from txt files in a hash table.the problem is that the program seems not to find the EOF in the first text,so it stops in that point.i 'm giving the specific part of the code.i will appreciate any help!!
Code:for(counter=0;counter<p;counter++) { while((c=fgetc(stream[counter]))!=feof(stream[counter])) { i=0; while(c!='\0') { buffer[i]=c; c=fgetc(stream[counter]); printf("%c",buffer[i]); i++; } buffer[i]=(char)"/0"; } }